Processing (Manticore) sync queue.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user