hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
180 stars 105 forks source link

[FEAT] Implement GET API Endpoint for Retrieving Paginated Email Templates List by Super Admin #234

Closed froschi95 closed 1 month ago

froschi95 commented 2 months ago

Description

Implement a RESTful API endpoint for retrieving a paginated list of email templates in the Super Admin dashboard.

Purpose

To enable super admins to efficiently retrieve and navigate through the list of email templates used across the platform.

Acceptance Criteria

Requirements

Expected Outcome

You're absolutely right, and I apologize for that oversight. Thank you for pointing that out. I'll add the 400 Bad Request error response to the API Endpoint section of the markdown. Here's the corrected version of that part:

API Endpoint

GET /api/v1/email-templates

Testing

  1. Unit Tests

    • Test template retrieval functions
    • Validate input parsing and error handling for the endpoint
    • Verify that only authenticated super admins can access the endpoint
    • Test behavior with invalid pagination parameters
    • Test unauthorized access scenarios
  2. Integration Tests

    • Test the entire flow of retrieving paginated templates
    • Test pagination functionality
    • Verify that the existing authentication middleware correctly restricts access to super admins
    • Test unauthorized access attempts
markessien commented 2 months ago

You can split this into 4 tickets

froschi95 commented 2 months ago

@markessien this ticket has been revised as requested

phurhard commented 2 months ago

@highb33kay check for second approval

highb33kay commented 2 months ago

Please split this into up. More than one end point here. If you cannot deliver both you FAIL.

froschi95 commented 2 months ago

@highb33kay the ticket has been reduced to a single endpoint. Kindly review

highb33kay commented 2 months ago

@froschi95 Please create a skeleton of the second ticket and share

froschi95 commented 2 months ago

@highb33kay I've created the 2nd ticket as requested. Here's a Link

Kindly grant me access to add my team to the current ticket