Closed Laban254 closed 2 weeks ago
Duplicated
@markessien This issue continues from issue https://github.com/hngprojects/hng_boilerplate_nestjs/issues/66 which has been closed.
Team TechTitans slack id: @kibe - Python @KingTsonga - Java @Japhet Paul - PHP @EAZYLINK - Javascript @Cliff - c#
Hello @Popsicool @buka4rill,
I have completed the implementation for this issue and received the first approval. Could you please review and provide the second approval at your earliest convenience?
Thank you!
Your response should be an array of users in that organization not a single user.
It's okay, @Popsicool. I'm working on it.
@Popsicool Done
Alright, add pagination to it
@Popsicool I have added the pagination.
Add next and prev to your response
Okey
@Popsicool Done with adding next and prev to the response
cool
Description: Implement filtering for users in an organization based on their status (members, suspended, left workspace).
Acceptance Criteria:
Filtering:
User Preferences:
Error Handling:
Security Measures:
Purpose: To filter users securely and efficiently, ensuring accurate and safe user management.
Requirements:
Expected Outcome:
Endpoints:
Fetch Users in Organization:
Description: Provide a list of users based on filter criteria within a specific organization with pagination support.
Endpoint:
GET /api/v1/organizations/{organization_id}/users
Request Headers:
Authorization: Bearer <token>
(required)Content-Type: application/json
Accept: application/json
Request Parameters:
status
:string
(values:members
,suspended
,left
)page
:integer
(optional,default: 1
)limit:
integer
(optional,default: 10
)Request Example:
Response (Success):
200 OK
Response Body:
Response (No Users Found):
404 Not Found
Response Body:
Response (Invalid Status):
400 Bad Request
Response Body:
Response (Unauthorized):
401 Unauthorized
Response Body:
Response (Internal Server Error):
500 Internal Server Error
Response Body:
Tasks:
GET /api/v1/organizations/{organization_id}/users
to fetch users based on filter criteria.Testing: