Collection: notifications
Data-model:
{
id: string,
userId: string,
message: string,
createdOn: unix-timestamp,
type: string
}
{
id: string,
username: string,
message: string,
createdOn: unix-timestamp,
type: string,
currentPage: number
}
Route | Description |
---|---|
GET /notifications | Returns notifications of the logged in user |
Returns all notifications for a logged in user
- Params
None - Query
page=[integer], n=[integer] (n
is the number of items perpage
) - Body
None - Headers
Content-Type: application/json - Cookie
rds-session:<JWT>
- Success Response:
- Code: 200
- Content:
{
message: 'Notifications returned successfully!',
data: [
<notification-object>,
<notification-object>,
<notification-object>,
<notification-object>,
<notification-object>
]
}
- Error Response:
- Code: 401
- Content:
{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }
- Content:
- Code: 503
- Content:
{ 'statusCode': 503, 'error': 'Service Unavailable', 'message': 'Something went wrong please contact admin' }
- Content:
- Code: 401