import { j as json } from './exports-D1quPX8S.js';
import { r as requireAdmin, d as getRequestId } from './helpers-kzwksNq1.js';
import { i as invalidateVersionCache } from './version-cache-CSnmLqxQ.js';
import './utils-BSRjJDrZ.js';
import './src-CidJbygh.js';
import './chunk-CLZ62Ad-.js';
import 'node:module';
import './provider-constants-DPrj3yBX.js';
import './dist-DOFcG0Zp.js';
import 'node:fs';
import 'node:path';
import 'buffer';
import 'fs';
import 'path';
import 'node:child_process';
import 'node:url';
import 'node:crypto';
import 'events';
import 'node:events';
import 'node:stream';
import 'node:string_decoder';
import 'assert';
import 'zlib';
import 'node:assert';
import 'node:fs/promises';
import 'node:os';
import './endpoints-UdQGgKsR.js';
import './state-fxN45gBp.js';

//#region src/routes/admin/versions/refresh/+server.ts
/**
* POST /admin/versions/refresh — invalidate all server-side version caches.
*
* Called by the admin UI's "Check for updates" button before re-fetching
* versions + releases + UI versions. The subsequent GETs see a cold cache and
* hit the upstreams (Docker Hub / npm / GitHub) once, then cache the fresh
* results for the TTL window.
*/
var POST = async (event) => {
	const authError = requireAdmin(event, getRequestId(event));
	if (authError) return authError;
	invalidateVersionCache();
	return json({ ok: true });
};

export { POST };
//# sourceMappingURL=_server.ts-CC7pljaX.js.map
