mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Converted admin, auth, me and realtime routes.
This commit is contained in:
parent
6c9f1ad06b
commit
5205551ca8
25 changed files with 346 additions and 7 deletions
|
|
@ -12,14 +12,18 @@ export function badRequest(message?: any) {
|
|||
return Response.json({ error: 'Bad request', message }, { status: 400 });
|
||||
}
|
||||
|
||||
export function notFound(message?: any) {
|
||||
return Response.json({ error: 'Not found', message, status: 404 });
|
||||
}
|
||||
|
||||
export function unauthorized(message?: any) {
|
||||
return Response.json({ error: 'Unauthorized', message }, { status: 401 });
|
||||
}
|
||||
|
||||
export function forbidden(message?: any) {
|
||||
return Response.json({ error: 'Forbidden', message, status: 403 });
|
||||
}
|
||||
|
||||
export function notFound(message?: any) {
|
||||
return Response.json({ error: 'Not found', message, status: 404 });
|
||||
}
|
||||
|
||||
export function serverError(error?: any) {
|
||||
return Response.json({ error: 'Server error', message: serializeError(error), status: 500 });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue