Remove try/catch

This commit is contained in:
Brad Traversy
2024-07-16 13:30:33 -04:00
parent ff8243cbca
commit 0aefe8fefc
2 changed files with 8 additions and 12 deletions
+1
View File
@@ -11,6 +11,7 @@ const MessagePage = async () => {
const sessionUser = await getSessionUser();
const { userId } = sessionUser;
console.log(userId);
const readMessages = await Message.find({ recipient: userId, read: true })
.sort({ createdAt: -1 }) // Sort read messages in asc order