You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.
There is NotificationUser model where we store which notification assigned to which user in a status.
So we have to update NotificationUser object when a user sees a notification.
If we send only "notification_id" that means that we update NotificationUser like all users have seen the notification.
Suppose it is not right and we need to update status for exact user and exact notification.
To do that I see two ways:
Add to PUT /api/notifications JSON one more field - "user_is"
It will look like this
{
"notification": "notification_id",
"user_id": "user_id"
}
So we will send from front-end to back-end which user have seen which notification.
We can use "id" from NotificationUser model, but for that we need to send "notification_user_id" from front-end.
Please check and approve which solution is more suitable.
My opinion: first case is better because it is more clean, but both cases require changes in front-end.
when the user sees the notification, the status must change
to be done after #98
PUT /api/notifications
Media type: Application/json
RequestBody(required): Notification id as json
Responses:
201: Notification object created
Example value:
400: Bad request
Example value:
401: Unauthorized Access
Example value:
Unauthorized Access
The text was updated successfully, but these errors were encountered: