Closed Benson-Ogheneochuko closed 2 weeks ago
Develop server-side logic to retrieve current notification settings.
/api/v1/settings/notification-settings
Authorization: Bearer <token>
Provide a backend service that allows users to retrieve their notification preferences securely.
[GET] /api/v1/settings/notification-settings
Headers:
{ "Content-Type": "application/json", "Authorization": "Bearer <JWT_TOKEN>" }
Path Parameters:
{ "userId": "String" }
Successful response
{ "message": "string", "success": true, "status_code": 200, "data": { // JSON object containing user notification settings key - value pairs } } ## Example User Settings { "email": false, "push-notification": true }
Error response
{ "message": "string", "success": false, "status_code": int }
Write unit tests that cover
How are you using post for getting?
@markessien Thank you for pointing that out, I have corrected it to use GET now.
Description
Develop server-side logic to retrieve current notification settings.
Acceptance Criteria
/api/v1/settings/notification-settings
Authorization: Bearer <token>
Purpose
Provide a backend service that allows users to retrieve their notification preferences securely.
Requirements
Expected Outcome
Status Codes
Endpoint
[GET] /api/v1/settings/notification-settings
Request:
Headers:
Path Parameters:
Responses:
Successful response
Error response
Testing
Write unit tests that cover