mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-07-14 18:15:56 -04:00
refactor: move system health procedure from system to admin router
- Rename `system.health` → `admin.systemHealth` and gate it behind the admin middleware - Remove `tmdbConfigured` from `system.status` response; update description to reflect its purpose - Update all call sites on web and native to use `orpc.admin.systemHealth` - Rename and relocate the docs page from `system/system.health.mdx` to `admin/admin.systemHealth.mdx`
This commit is contained in:
@@ -406,23 +406,12 @@ export const contract = {
|
||||
method: "GET",
|
||||
path: "/system/status",
|
||||
tags: ["System"],
|
||||
summary: "Get system status",
|
||||
summary: "Get internal system config",
|
||||
description:
|
||||
"Quick check of whether TMDB is configured. Does not require authentication.",
|
||||
successDescription: "TMDB configuration status",
|
||||
"Returns internal configuration such as the public API URL. Requires authentication.",
|
||||
successDescription: "Internal system configuration",
|
||||
})
|
||||
.output(SystemStatusOutput),
|
||||
health: oc
|
||||
.route({
|
||||
method: "GET",
|
||||
path: "/system/health",
|
||||
tags: ["System"],
|
||||
summary: "Get system health report",
|
||||
description:
|
||||
"Comprehensive health check covering database, TMDB connectivity, cron jobs, image cache, backups, and environment. Admin only.",
|
||||
successDescription: "Full system health report",
|
||||
})
|
||||
.output(SystemHealthOutput),
|
||||
},
|
||||
integrations: {
|
||||
list: oc
|
||||
@@ -653,6 +642,17 @@ export const contract = {
|
||||
})
|
||||
.input(z.void())
|
||||
.output(PurgeImageCacheOutput),
|
||||
systemHealth: oc
|
||||
.route({
|
||||
method: "GET",
|
||||
path: "/admin/system-health",
|
||||
tags: ["Admin"],
|
||||
summary: "Get system health report",
|
||||
description:
|
||||
"Comprehensive health check covering database, TMDB connectivity, cron jobs, image cache, backups, and environment.",
|
||||
successDescription: "Full system health report",
|
||||
})
|
||||
.output(SystemHealthOutput),
|
||||
},
|
||||
account: {
|
||||
updateName: oc
|
||||
|
||||
@@ -884,12 +884,11 @@ export const SystemHealthSchema = z
|
||||
|
||||
export const SystemStatusOutput = z
|
||||
.object({
|
||||
tmdbConfigured: z
|
||||
.boolean()
|
||||
.describe("Whether a TMDB API token is configured"),
|
||||
publicApiUrl: z.string().describe("Base URL of the centralized public API"),
|
||||
})
|
||||
.meta({ description: "Quick TMDB configuration check" });
|
||||
.meta({
|
||||
description: "Internal system configuration for authenticated clients",
|
||||
});
|
||||
|
||||
export const SystemHealthOutput = SystemHealthSchema;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user