25 lines
687 B
TypeScript
25 lines
687 B
TypeScript
// Function deprecated. This endpoint was replaced by shared module `_shared/openai-service.ts`.
|
|
import "jsr:@supabase/functions-js/edge-runtime.d.ts";
|
|
|
|
const json = (body: unknown, status = 200) =>
|
|
new Response(JSON.stringify(body), {
|
|
status,
|
|
headers: {
|
|
"content-type": "application/json; charset=utf-8",
|
|
"access-control-allow-origin": "*",
|
|
"access-control-allow-headers": "*",
|
|
},
|
|
});
|
|
|
|
Deno.serve((req) => {
|
|
if (req.method === "OPTIONS") return json({ ok: true });
|
|
return json(
|
|
{
|
|
ok: false,
|
|
error:
|
|
"This endpoint is deprecated. Use the shared module _shared/openai-service.ts from your functions.",
|
|
},
|
|
410,
|
|
);
|
|
});
|