add simple admin service
Build and deploy / deploy (push) Successful in 16s

This commit is contained in:
2026-05-18 02:48:47 +03:00
parent 10a83d39a2
commit 3a3b2bcfc0
84 changed files with 2134 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
import { sendJson } from './sendJson.mjs';
export function sendError(response, error) {
const status = error.status || 500;
const message = status >= 500 ? 'Internal server error' : error.message;
if (status >= 500) {
console.error(error);
}
return sendJson(response, { error: message }, status);
}