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 z from 'zod'
import { albumAccess } from '../../../utils/album-access'
import {
resourceReadResponse,
useResourceReader,
} from '../../../utils/resource-reader'
export default eventHandler(async (event) => {
const { albumId } = await getValidatedRouterParams(
event,
z.object({
albumId: z
.string()
.regex(/^\d+$/)
.transform((value) => parseInt(value, 10)),
}).parse,
)
const access = await albumAccess(event)
return resourceReadResponse(() =>
useResourceReader().getAlbum(albumId, access),
)
})