This commit is contained in:
dicedtomato 2023-02-24 00:18:03 +00:00 committed by GitHub
parent 739f584921
commit 34552926d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ import { createInvisURL, randomChars } from 'lib/util';
const logger = Logger.get('shorten'); const logger = Logger.get('shorten');
async function handler(req: NextApiReq, res: NextApiRes) { 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({ const user = await prisma.user.findFirst({
where: { where: {