mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Correct HTTP response. Fixes #2134
This commit is contained in:
parent
2b06c4b4d1
commit
64ebe8b307
1 changed files with 3 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { NextApiResponse } from 'next';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { badRequest, methodNotAllowed, ok, unauthorized } from 'next-basics';
|
||||
import { WebsiteMetric, NextApiRequestQueryBody } from 'lib/types';
|
||||
import { canViewWebsite } from 'lib/auth';
|
||||
import { useAuth, useCors } from 'lib/middleware';
|
||||
|
|
@ -121,6 +121,8 @@ export default async (
|
|||
|
||||
return ok(res, data);
|
||||
}
|
||||
|
||||
return badRequest(res);
|
||||
}
|
||||
|
||||
return methodNotAllowed(res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue