From 34552926d1373e75deb17bfedb8b2bc9a5f0c84e Mon Sep 17 00:00:00 2001 From: dicedtomato <35403473+diced@users.noreply.github.com> Date: Fri, 24 Feb 2023 00:18:03 +0000 Subject: [PATCH] fix: #296 --- src/pages/api/shorten.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/shorten.ts b/src/pages/api/shorten.ts index c3d18cb..8c0b8b9 100644 --- a/src/pages/api/shorten.ts +++ b/src/pages/api/shorten.ts @@ -8,7 +8,7 @@ import { createInvisURL, randomChars } from 'lib/util'; const logger = Logger.get('shorten'); async function handler(req: NextApiReq, res: NextApiRes) { - if (!req.headers.authorization) return res.badRequest('no authorization'); + if (!req.headers.authorization) return res.forbidden('no authorization'); const user = await prisma.user.findFirst({ where: {