Update index.ts
This commit is contained in:
@@ -6,6 +6,7 @@ import sharp from "sharp"
|
|||||||
import { unlink } from "fs/promises"
|
import { unlink } from "fs/promises"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { readdir } from "fs/promises"
|
import { readdir } from "fs/promises"
|
||||||
|
import { log } from "console"
|
||||||
|
|
||||||
// --- Configuration ---
|
// --- Configuration ---
|
||||||
const FOLDER_BASE = "./data"
|
const FOLDER_BASE = "./data"
|
||||||
@@ -206,6 +207,7 @@ export const app = new Elysia()
|
|||||||
.post("/delete", async ({ body, headers }) => {
|
.post("/delete", async ({ body, headers }) => {
|
||||||
const { id } = body
|
const { id } = body
|
||||||
checkHeaderKey(headers)
|
checkHeaderKey(headers)
|
||||||
|
log(`[+] Received delete request for photo ${id}`)
|
||||||
|
|
||||||
const metadata = await getMetadata()
|
const metadata = await getMetadata()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user