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