hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT] Fetch single user API #81

Closed scottandee closed 2 weeks ago

scottandee commented 1 month ago

Description

Develop API endpoint to fetch a single user

Acceptance Criteria

Request

Endpoint

GET /api/v1/users/:userId

Parameters:

Expected Outcome

{
  "status":string,
  "message": string,
  "status_code":int
}

Purpose

Provides a backend service which allows users to fetch a single user

Requirements

Tasks

Create User Fetching Logic

Authorization Checks

Database Operations:

Error Handling and Logging:

Tests

  1. Write unit tests for the GET /api/users/:userId endpoint.
  2. Write unit tests for validation and error handling logic.
  3. Write integration tests for the end-to-end user fetching process.
  4. Test the full flow from requesting user details to receiving the response.
  5. Ensure the system handles successful and failed requests appropriately.
markessien commented 1 month ago

Retrieval by superadmin is not different from standard retrieval

King-Mikaelson commented 1 month ago

Team Members working on this issue include:

I couldn't assign them directly to the repo since they don't have access to the repo

buka4rill commented 1 month ago

change statusCode to status_code

King-Mikaelson commented 1 month ago

change statusCode to status_code

Done thank you