Added cache reload button to admin panel so restarts are needed less often.

This commit is contained in:
2026-03-06 06:12:23 +01:00
parent 9a59448933
commit 6c1f1c2a1c
12 changed files with 78 additions and 10 deletions

12
src/web/system.js Normal file
View File

@@ -0,0 +1,12 @@
import { HttpError } from '../errors.js';
import { initCaches } from '../cache.js';
export async function initCachesApi(req, res) {
if (req.user?.role !== 'admin') {
throw new HttpError('You must be an admin to initialize caches', 404);
}
await initCaches();
res.status(204).send();
}