Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server/src/controllers/auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,5 @@ export const resetPassword = asyncHandler(async (req, res) => {
});

});

.catch(err => console.error("Promise.all failed:", err));
2 changes: 1 addition & 1 deletion server/src/controllers/message.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const getMessages = asyncHandler(async (req, res) => {
}
}

const limit = Math.min(Math.max(parseInt(req.query.limit) || 50, 1), MAX_LIMIT);
const limit = Math.min(Math.max(parseInt(req.query.limit, 10) || 50, 1), MAX_LIMIT);
const before = req.query.before;

let beforeId;
Expand Down
2 changes: 1 addition & 1 deletion server/src/controllers/post.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ poll = {

export const getPosts = asyncHandler(async (req, res) => {
const cursor = req.query.cursor;
const limit = Math.min(Math.max(parseInt(req.query.limit) || 10, 1), MAX_LIMIT);
const limit = Math.min(Math.max(parseInt(req.query.limit, 10) || 10, 1), MAX_LIMIT);

let filter = { isDeleted: { $ne: true } };
if (req.user) {
Expand Down