feat: storage management (retention, source purge) + Synology NAS backup
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import type { APIRoute } from 'astro';
|
||||
import { loadNasConfig, testNas } from '../../../lib/nas';
|
||||
|
||||
export const prerender = false;
|
||||
const json = (b: unknown, s = 200) =>
|
||||
new Response(JSON.stringify(b), { status: s, headers: { 'Content-Type': 'application/json' } });
|
||||
|
||||
export const POST: APIRoute = async () => {
|
||||
const cfg = await loadNasConfig();
|
||||
if (!cfg) return json({ ok: false, message: 'NAS nicht vollständig konfiguriert (oder deaktiviert).' });
|
||||
return json(await testNas(cfg));
|
||||
};
|
||||
Reference in New Issue
Block a user