Update index.ts
This commit is contained in:
+3
-1
@@ -198,8 +198,10 @@ export const app = new Elysia()
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
.post("/delete", async ({ body }) => {
|
.post("/delete", async ({ body, headers }) => {
|
||||||
const { id } = body
|
const { id } = body
|
||||||
|
checkHeaderKey(headers)
|
||||||
|
|
||||||
const metadata = await getMetadata()
|
const metadata = await getMetadata()
|
||||||
|
|
||||||
const photoIndex = metadata.findIndex((p) => p.id === id)
|
const photoIndex = metadata.findIndex((p) => p.id === id)
|
||||||
|
|||||||
Reference in New Issue
Block a user