alert mark as read bug fix
This commit is contained in:
@@ -85,11 +85,12 @@ export async function markAsRead(alertId: string, user: AuthenticatedUser) {
|
||||
|
||||
if (!updatedAlert) return null;
|
||||
|
||||
updatedAlert["read"] = updatedAlert.readBy.includes(user.userId)
|
||||
? true
|
||||
: false;
|
||||
const modifiedAlert = {
|
||||
...updatedAlert.toObject(),
|
||||
read: updatedAlert.readBy.includes(user.userId) ? true : false,
|
||||
};
|
||||
|
||||
return updatedAlert;
|
||||
return modifiedAlert;
|
||||
}
|
||||
|
||||
export async function getUnreadCount(user: AuthenticatedUser) {
|
||||
|
||||
Reference in New Issue
Block a user