mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-06 14:20:10 +00:00
Pass user ID to addSyncShelvesJob
Include the requesting user's ID as an additional argument when enqueueing immediate shelf sync jobs so the job has user context. Updated the route implementation and adjusted affected tests (goodreads-shelves-id, hardcover-shelves-id, and hardcover-shelves routes tests) to expect the extra 'user-1' parameter.
This commit is contained in:
@@ -137,7 +137,7 @@ describe('POST /api/user/hardcover-shelves', () => {
|
||||
);
|
||||
|
||||
// Immediate background sync must have been triggered
|
||||
expect(jobQueueMock.addSyncShelvesJob).toHaveBeenCalledWith(undefined, 'new-shelf', 'hardcover', 0);
|
||||
expect(jobQueueMock.addSyncShelvesJob).toHaveBeenCalledWith(undefined, 'new-shelf', 'hardcover', 0, 'user-1');
|
||||
});
|
||||
|
||||
it('strips Bearer prefix from apiToken before encrypting', async () => {
|
||||
|
||||
Reference in New Issue
Block a user