mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
chore: remove the monitoring settings route and an unused query key
The root layout now reads the public monitoring switches while it renders, so nothing calls GET /api/monitoring/settings any more (the native client never did); the route and its unpublished entry in the route coverage guard go. The Coach feedback card reads the AI quality card's cell, which left queryKeys.adminCoachFeedback() without a reader.
This commit is contained in:
1 parent
0a71e8ffa5
commit
51c4a498d9
5 files changed
+4
-23
No files matched your search
@@ -339,7 +339,6 @@ const UNPUBLISHED: Readonly<Record<string, Exemption>> = {
|
||||
"/api/internal/web-vitals": { kind: "internalOps", methods: ["POST"] },
|
||||
"/api/monitoring/csp-report": { kind: "internalOps", methods: ["POST"] },
|
||||
"/api/monitoring/glitchtip": { kind: "internalOps", methods: ["POST"] },
|
||||
"/api/monitoring/settings": { kind: "internalOps", methods: ["GET"] },
|
||||
"/api/monitoring/umami-script": { kind: "internalOps", methods: ["GET"] },
|
||||
"/api/monitoring/umami/{path}": { kind: "internalOps", methods: ["POST"] },
|
||||
"/api/mcp/oauth/authorize": {
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { apiHandler } from "@/lib/api-handler";
|
||||
import { annotate } from "@/lib/logging/context";
|
||||
import { apiSuccess } from "@/lib/api-response";
|
||||
import { getPublicMonitoringSettings } from "@/lib/monitoring-settings";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export const GET = apiHandler(async () => {
|
||||
annotate({ action: { name: "monitoring.settings.get" } });
|
||||
|
||||
const settings = await getPublicMonitoringSettings();
|
||||
return apiSuccess({
|
||||
umamiEnabled: settings.umamiEnabled,
|
||||
umamiWebsiteId: settings.umamiWebsiteId,
|
||||
glitchtipEnabled: settings.glitchtipEnabled,
|
||||
});
|
||||
});
|
||||
@@ -3,8 +3,8 @@ import { renderToStaticMarkup } from "react-dom/server";
|
||||
|
||||
/**
|
||||
* The monitoring switches come from the root layout's render, not from a
|
||||
* request every page load sent to `/api/monitoring/settings` for three
|
||||
* instance-wide values. The first render already mounts what they turn on.
|
||||
* request on every page load for three instance-wide values. The first
|
||||
* render already mounts what they turn on.
|
||||
*/
|
||||
|
||||
const apiGet = vi.fn();
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { PublicMonitoringSettings } from "@/lib/monitoring-settings";
|
||||
/**
|
||||
* Mounts the operator's analytics script and error reporter. The root layout
|
||||
* reads the instance-wide switches on the server and passes them in, so no
|
||||
* page load asks `/api/monitoring/settings` for three values the document
|
||||
* render already had. `null` (the key-mismatch page) mounts nothing.
|
||||
* page load asks for three values the document render already has. `null`
|
||||
* (the key-mismatch page) mounts nothing.
|
||||
*/
|
||||
export function MonitoringBootstrap({
|
||||
settings,
|
||||
|
||||
@@ -65,7 +65,6 @@ export const adminKeys = {
|
||||
adminRecoveryKit: () => ["admin", "recovery-kit"] as const,
|
||||
/** Every backup signal's verdict (admin overview + Backups). */
|
||||
adminRecoveryReadiness: () => ["admin", "recovery-readiness"] as const,
|
||||
adminCoachFeedback: () => ["admin", "coach-feedback"] as const,
|
||||
adminFeedback: (status: string) => ["admin", "feedback", status] as const,
|
||||
adminFeedbackRoot: () => ["admin", "feedback"] as const,
|
||||
adminHostMetrics: (window: string) =>
|
||||
|
||||
Reference in new issue
Block a user