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
+34
View File
@@ -0,0 +1,34 @@
import { getNetaDiscoveryDocument } from "@/server/api/v1/runtime";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export function GET() {
try {
return Response.json(getNetaDiscoveryDocument(), {
headers: {
"Cache-Control": "public, max-age=60, stale-while-revalidate=300",
"X-Content-Type-Options": "nosniff",
},
});
} catch (error) {
console.error("Neta discovery failed", error);
return Response.json(
{
protocol: "neta",
discoveryVersion: 1,
error: {
code: "SERVICE_UNAVAILABLE",
message: "Instance keşif bilgisi geçici olarak kullanılamıyor.",
},
},
{
status: 503,
headers: {
"Cache-Control": "no-store",
"X-Content-Type-Options": "nosniff",
},
},
);
}
}