Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
import { requireAdminSession } from '../../utils/require-admin.ts'
import { z } from 'zod'
import { useAlbumWriter, mutationResponse } from '../../utils/resource-writer'
export default eventHandler(async (event) => {
await requireAdminSession(event)
const { albumIds } = await readValidatedBody(
event,
z.object({
albumIds: z.array(z.number().int()),
}).parse,
)
return mutationResponse(() =>
useAlbumWriter().reorder(albumIds, { authenticated: true }),
)
})