- Settings modal (gear icon) lets you configure all service URLs and API keys from the dashboard; values persist to data/settings.json with process.env as fallback so existing .env.local setups keep working - Per-service Test button hits each service's status endpoint and reports the version on success - Discord webhook support: structured embeds per alert category (requesters, approval age, episode progress, watch-rate stats) sent on new/reopened alerts only — already-open alerts don't re-notify - Alert detail page restructured: prose descriptions replaced with labelled fields, episode progress bar for partial TV, watch-rate stat block, View in Radarr/Sonarr/Seerr action buttons, requester names link to Overseerr profiles, timestamps moved inline with status - Tab state is pure client state (no ?tab= in URL); router.back() used on alert detail for clean browser history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
474 B
TypeScript
17 lines
474 B
TypeScript
import { getSettings, saveSettings, AppSettings } from "@/lib/settings";
|
|
|
|
export async function GET() {
|
|
return Response.json(getSettings());
|
|
}
|
|
|
|
export async function PUT(req: Request) {
|
|
try {
|
|
const body = await req.json() as AppSettings;
|
|
const saved = saveSettings(body);
|
|
return Response.json(saved);
|
|
} catch (err) {
|
|
const message = err instanceof Error ? err.message : String(err);
|
|
return Response.json({ error: message }, { status: 400 });
|
|
}
|
|
}
|