Skip to content

Commit

Permalink
fix: backwards compatible next from queue
Browse files Browse the repository at this point in the history
  • Loading branch information
7sete7 committed Jun 21, 2024
1 parent 3744864 commit 47412f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/imports/meta/getNextUserFromQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ export async function getNextUserFromQueue(queueStrId, user) {
const queueUser = await collection.findOneAndUpdate(query, update, options);

if (queueUser != null) {
const user = convertObjectIds(queueUser);
return {
success: true,
data: convertObjectIds(queueUser),
data: user,
user
};
}

Expand All @@ -64,9 +66,11 @@ export async function getNextUserFromQueue(queueStrId, user) {
}

if (queueOwner?._user != null && queueOwner._user.length > 0) {
const user = convertObjectIds({ user: queueOwner._user[0] });
return {
success: true,
data: convertObjectIds({ user: queueOwner._user[0] }),
data: user,
user
};
}

Expand Down

0 comments on commit 47412f4

Please sign in to comment.