export default defineEventHandler((event) => { const library = publicLibrary(event) const light = String(getQuery(event).light || '') === '1' if (!light) { try { const { owner } = assertLibraryOwner(event) const folderId = library.folders.find(folder => folder.unlocked)?.id void maintainLibrary(owner, folderId).catch(() => null) } catch { /* locked or anonymous — still return what we can */ } } return library })