OpenAPI spec at /api/docs with a Scalar viewer, opt-in via FEAT_API_DOCS
This commit is contained in:
251 files changed
+32497
-66
No files matched your search
@@ -9,6 +9,12 @@ import { getInstanceId } from '$lib/server/backups/identity';
|
||||
// abort the sync `restic snapshots` at ~15s) and headers don't survive polling. The
|
||||
// client fetches the id here once and matches it against each snapshot's
|
||||
// dockhand:instance= tag to tell own snapshots from foreign orphans (#1351).
|
||||
/**
|
||||
* @openapi
|
||||
* summary: This install's stable backup instance id, used to tell own snapshots from foreign orphans
|
||||
* description: Requires backups:view; 403 (no permission) and 404 (backup feature disabled) come from the shared requireBackups guard.
|
||||
* resp-200: {instanceId:string!}
|
||||
*/
|
||||
export const GET: RequestHandler = async ({ cookies }) => {
|
||||
const auth = await authorize(cookies);
|
||||
const denied = await requireBackups(auth, 'view');
|
||||
|
||||
Reference in new issue
Block a user