Fetch links when gettign user notifications
This commit is contained in:
parent
6c9afdbdeb
commit
dc18c86057
|
@ -68,7 +68,7 @@ async def get_user_notifications(user_id: PydanticObjectId, user: CurrentUserDep
|
|||
if user.id != user_id:
|
||||
raise HTTPException(status.HTTP_403_FORBIDDEN, "You can only access your own notifications.")
|
||||
|
||||
notifications = await Notification.find(expr(Notification.user).id == user.id).to_list()
|
||||
notifications = await Notification.find(expr(Notification.user).id == user.id, fetch_links=True).to_list()
|
||||
return [NotificationData.from_notification(notification) for notification in notifications]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue