File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
backend/PyMatcha/routes/api Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1313@notifications_bp .route ("/notifications" , methods = ["GET" ])
1414@jwt_required
1515def get_all_notifications ():
16- return SuccessOutput ("notifications" , current_user .get_all_notifications ())
16+ all_notifications = [notif .to_dict () for notif in current_user .get_all_notifications ()]
17+ return SuccessOutput ("notifications" , all_notifications )
1718
1819
1920@notifications_bp .route ("/notifications/unread" , methods = ["GET" ])
2021@jwt_required
2122def get_unread_notifications ():
22- return SuccessOutput ("notifications" , current_user .get_unread_notifications ())
23+ unread_notifications = [notif .to_dict () for notif in current_user .get_unread_notifications ()]
24+ return SuccessOutput ("notifications" , unread_notifications )
2325
2426
2527@notifications_bp .route ("/notifications/read/<n_id>" , methods = ["POST" ])
You can’t perform that action at this time.
0 commit comments