feat(api): complete phase 9 mobile contracts

This commit is contained in:
poyrazavsever
2026-07-17 09:38:22 +03:00
parent 46a746d2d4
commit b04031a3e3
25 changed files with 4896 additions and 19 deletions
+27
View File
@@ -0,0 +1,27 @@
import { apiV1Error, apiV1Success } from "@/server/api/v1/responses";
import { checkReadiness } from "@/server/db/health";
import { DomainError } from "@/server/domain/errors";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export function GET() {
const readiness = checkReadiness();
const checkedAt = new Date().toISOString();
if (!readiness.ok) {
return apiV1Error(
new DomainError(
"SERVICE_UNAVAILABLE",
"Instance henüz isteklere hazır değil.",
{ checks: readiness.checks, checkedAt },
),
);
}
return apiV1Success({
status: "ok",
checks: readiness.checks,
checkedAt,
});
}