feat: add extensive test suite

This commit is contained in:
2026-08-30 11:33:53 +07:00 Unverified
parent 061cce00dc
commit 8359c7272e
131 changed files with 8717 additions and 2200 deletions
+6 -9
View File
@@ -1,13 +1,10 @@
import { actionLog } from "@/lib/api";
import { adminCheck } from "@/lib/auth";
import { createAmberSyncHandler } from "@/lib/server-handlers";
import { syncAmber } from "@/util/sync";
export async function GET() {
if (!(await adminCheck()))
return new Response("Unauthorized", { status: 401 });
await syncAmber();
await actionLog("Triggered an Amber sync from API");
return new Response(
"OK(log is wip, check `kubectl logs -fn buzz deployments/app`)",
);
}
export const GET = createAmberSyncHandler({
adminCheck,
sync: syncAmber,
log: actionLog,
});