hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
154 stars 136 forks source link

[FEAT]: Get Waitlist Endpoint (admin) - BACKEND #235

Open Afeh opened 2 months ago

Afeh commented 2 months ago

Description

Create a backend API endpoint to return emails of users that register on the waitlist signup form on the website.

Acceptance Criteria

METHOD

GET 

URL

api/v1/waitlist/users

RESPONSE

Successful Response (status code: 200)

{
"message": "waitlist retrieved successfully", 
"status_code": 200,
"data": ["usermail@example.com", "usermail2@example.com"]
}

Error Response (status_code: 401)

{
"message": "user does not have admin privileges"
"status_code": 401,
"data": {}
}

Purpose

To allow admin to retrieve users that registered on the waitlist form.

Requirements

Expected Outcome

A secure and efficient endpoint that can retrieve user waitlist information stored in the database.

Testing

Nifilat commented 2 months ago

Hi Afeh, I think your endpoint should be api/v1/waitlist/users not /join

Afeh commented 2 months ago

Hi. Noted. I'd make the change

On Tue, Jul 23, 2024, 4:40 PM OLUWANIFEMI @.***> wrote:

Hi Afeh, I think your endpoint should be api/v1/waitlist/users not /join

— Reply to this email directly, view it on GitHub https://github.com/hngprojects/hng_boilerplate_python_fastapi_web/issues/235#issuecomment-2245592658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQR6ZOMCKHMAO6OGN2MVAM3ZNZ2QNAVCNFSM6AAAAABLKVZORSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGU4TENRVHA . You are receiving this because you authored the thread.Message ID: <hngprojects/hng_boilerplate_python_fastapi_web/issues/235/2245592658@ github.com>