mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add Mux health check action (#542)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
78de97ec23
commit
1d6cc2b8c0
@@ -0,0 +1,14 @@
|
||||
import { actions } from 'astro:actions';
|
||||
import type { APIRoute } from 'astro';
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
export const GET: APIRoute = async (context) => {
|
||||
const { data, error } = await context.callAction(actions.mux.health, {});
|
||||
|
||||
if (error) {
|
||||
return Response.json({ ok: false, error: error.message }, { status: 502 });
|
||||
}
|
||||
|
||||
return Response.json(data);
|
||||
};
|
||||
Reference in New Issue
Block a user