Skip to content

Commit

Permalink
Fix: isOver is always false
Browse files Browse the repository at this point in the history
  • Loading branch information
kmc7468 committed Jan 21, 2025
1 parent 0f7c9dd commit d290945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const infoHandler = async (req, res) => {
.lean()
.populate(roomPopulateOption);
if (roomObject) {
const isOver = getIsOver(roomObject, user._id);
const isOver = getIsOver(roomObject, user._id.toString());
res.send(formatSettlement(roomObject, { isOver }));
} else {
res.status(404).json({
Expand Down Expand Up @@ -391,7 +391,7 @@ const abortHandler = async (req, res) => {
});

const roomObject = (await room.populate(roomPopulateOption)).toObject();
const isOver = getIsOver(roomObject, user._id);
const isOver = getIsOver(roomObject, user._id.toString());

res.send(formatSettlement(roomObject, { isOver }));
} catch (err) {
Expand Down

0 comments on commit d290945

Please sign in to comment.