Converted admin, auth, me and realtime routes.

This commit is contained in:
Mike Cao 2025-01-28 22:29:03 -08:00
parent 6c9f1ad06b
commit 5205551ca8
25 changed files with 346 additions and 7 deletions

View file

@ -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 });
}