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 { getRouterParam } from 'h3'
import {
definePlatformHandler,
platformDatabase,
} from '../../../../../shared/platform/runtime'
import { siteManagement } from '../../../utils/site-management'
import { siteMaps } from '../../../../../../packages/platform/src/maps'
export default definePlatformHandler(async (event) => {
const { userId, store } = await siteManagement(event)
const siteId = Number(getRouterParam(event, 'siteId'))
const site = await store.get(userId, siteId)
return {
...(await siteMaps(platformDatabase(event), siteId)),
role: site.role,
}
})