From cbcea2719ad8187e7b9c32240ce46e21476a5d25 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:12:11 +0800 Subject: [PATCH] Update index.ts --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 03e7d5e..6147d7f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -144,6 +144,11 @@ export const app = new Elysia() const id = Math.random().toString().substring(2, 10) let metadata = await getMetadata() + // Check duplicate owner key + if (metadata.find((p) => p.owner_key === owner_key)) { + done(400, "Owner key already in use. Please use a unique owner key.") + } + // Process and save files // We use {id}-1 and {id}-2 as requested by "{id}-{number}" const originalExt = photo.name.split(".").pop() || "jpg"