hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT] Develop API Endpoints for Notification Settings - Backend #104

Closed Benson-Ogheneochuko closed 1 month ago

Benson-Ogheneochuko commented 1 month ago

Description

Develop server-side logic to retrieve current notification settings.

Acceptance Criteria

Purpose

Provide a backend service that allows users to retrieve their notification preferences securely.

Requirements

Expected Outcome

Status Codes

Endpoint

[POST] /api/v1/notification-settings

Request:

Headers:

{
  "Content-Type": "application/json",
  "Authorization": "Bearer <JWT_TOKEN>"
}

Body:

{
  "userId": "String"
}

Responses:

Successful response

{
  "message": "string",
  "success": true,
  "status_code": 200,
  "data": {
    // JSON object containing user notification settings
  }
}

## Example User Settings
{
  "email": false,
  "push-notification": true
}

Error response

{
  "message": "string",
  "success": false,
  "status_code": int
}

Testing

Write unit tests that cover

markessien commented 1 month ago

this is not coherent

Benson-Ogheneochuko commented 1 month ago

Slack ID of Interns working on this issue.

Nockk batman.py