feat(security): harden the API, trust Hiboutik for deletions, lock syncs (#3)

This commit is contained in:
2026-11-08 09:36:50 +00:00
parent 6121b9c9bf
commit 04960379e8
31 changed files with 923 additions and 499 deletions

View File

@@ -27,12 +27,12 @@ describe('AppController (e2e)', () => {
});
it('POST /sync starts a synchronization (202)', () => {
hiboutikService.startSync.mockReturnValue(true);
hiboutikService.startSync.mockResolvedValue(true);
return request(app.getHttpServer()).post('/sync').expect(202).expect({ message: 'Hiboutik synchronization started' });
});
it('POST /sync answers 409 when a synchronization is already running', () => {
hiboutikService.startSync.mockReturnValue(false);
hiboutikService.startSync.mockResolvedValue(false);
return request(app.getHttpServer()).post('/sync').expect(409);
});