Processing (Manticore) sync queue.

This commit is contained in:
2026-06-08 23:32:40 +02:00
parent 1f58f989f7
commit 20f304c9cd
4 changed files with 51 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import {
syncMovies,
syncActors,
syncStashes,
syncQueue,
} from '../sync.js';
import verifyAbility from '../../utils/verify-ability.js';
@@ -43,7 +44,16 @@ async function syncStashesApi(req, res) {
res.status(204).send();
}
async function syncQueueApi(req, res) {
verifyAbility(req.user, 'sync', null, { throwError: true });
await syncQueue();
res.status(204).send();
}
syncRouter.post('/api/sync/scenes', syncScenesApi);
syncRouter.post('/api/sync/movies', syncMoviesApi);
syncRouter.post('/api/sync/actors', syncActorsApi);
syncRouter.post('/api/sync/stashes', syncStashesApi);
syncRouter.post('/api/sync', syncQueueApi);