Skip to content

Commit

Permalink
modify redis queue
Browse files Browse the repository at this point in the history
  • Loading branch information
transcai committed Nov 2, 2022
1 parent 70ad479 commit cf9c68f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/car.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ router.post('/Enqueue', verifyReqParams, verifySign, async (req, res, next) => {
waitQueue[UserId].TimeStamp = Date.now();
waitQueue[UserId].ProjectId = ProjectId;
LOG.debug(`${UserId} update timestamp`);
return response(waitQueue[UserId], queue.indexOf(UserId));
return response(waitQueue[UserId], await queue.indexOf(UserId));
}

const newUser = {
Expand All @@ -215,7 +215,7 @@ router.post('/Enqueue', verifyReqParams, verifySign, async (req, res, next) => {
waitQueue[UserId] = newUser;
LOG.debug(`new user ${UserId} queuing`);

return response(newUser, queue.indexOf(UserId));
return response(newUser, await queue.indexOf(UserId));
});

router.post('/Dequeue', verifyReqParams, verifySign, async (req, res, next) => {
Expand Down

0 comments on commit cf9c68f

Please sign in to comment.