Update index.ts
This commit is contained in:
+1
-1
@@ -279,7 +279,7 @@ export const app = new Elysia()
|
||||
const metadata = await getMetadata()
|
||||
|
||||
const photo = metadata.find((p) => p.id === idOrKey) || metadata.find((p) => p.owner_key === idOrKey)
|
||||
if (!photo || photo.hide === true) done(404, "Photo not found")
|
||||
if (!photo || photo.hide === true) done(404, "GET /:idOrKey - Photo not found")
|
||||
if (photo.id != idOrKey) return redirect(`https://aza.moe/photo/${photo.id}?owner_key=${idOrKey}`)
|
||||
|
||||
return redirect(`https://aza.moe/photo/${photo.id}`)
|
||||
|
||||
Reference in New Issue
Block a user