From a694eea39b0fe1db4beb2284ee1250ac29250e43 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 30 May 2024 12:57:49 +0800 Subject: [PATCH] Do not replace + with space --- routes/api/tag/[id].ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/routes/api/tag/[id].ts b/routes/api/tag/[id].ts index e23ff2a..d3a7b63 100644 --- a/routes/api/tag/[id].ts +++ b/routes/api/tag/[id].ts @@ -15,8 +15,7 @@ export const handler: Handlers = { if (u && !u.is_admin && !(u.permissions & UserPermission.ReadGallery)) { return return_error(403, "Permission denied."); } - const ids = decodeURIComponent(ctx.params.id.replaceAll("+", "%20")) - .split(","); + const ids = decodeURIComponent(ctx.params.id).split(","); const r: Record> = {}; for (const _id of ids) { const id = parseInt(_id);