hngprojects / hng_boilerplate_expressjs

74 stars 83 forks source link

[FEAT]: Endpoint to Export User Data (.csv, PDF) #122

Open Ibrahim4Grace opened 1 month ago

Ibrahim4Grace commented 1 month ago

Description

Users should have the ability to export their data in .csv and PDF formats from their profile page. This feature will enhance user experience by providing a convenient way for users to download and manage their data offline.

Acceptance Criteria

Technical Details

{
  "export_formats": "csv", "pdf",
  "export_location": "User Profile or Data Management Page",
  "included_data": "User Details", "relevant Data",
  "csv_format": "Comma-separated",
  "pdf_format": "Formatted and Readable",
  "error_handling": "Inform user if export process fails",
  "tests": "Unit Tests", "Integration Tests"
}

Response Example

On successful exporting data , the API should return a 200 OK status code. The response body should contain a success message:

{
 "status": "success",
  "status_code": 200,
  "message": "File exported successfully."
}

Output Validation

If there is an error in exporting the date(e.g., network issues), the API should return a 500 Internal Server Error status code with an appropriate message:

{
 "status": "unsuccessful",
  "status_code": 500,
  "message": "Failed to export user data. Please try again later."
}

Authentication and Authorization

Authentication

Authorization

Documentation

Dependencies and Impact

Testing Requirements

AdeGneus commented 1 month ago

Follow the issue guide and use snake case for the responses

Ibrahim4Grace commented 1 month ago

@AdeGneus updated

AdeGneus commented 1 month ago

@incredible-phoenix246 He didn't follow the format

Ibrahim4Grace commented 1 month ago

@AdeGneus @incredible-phoenix246 updated

AdeGneus commented 1 month ago

Good issue

incredible-phoenix246 commented 1 month ago

@AdeGneus u no get joy 😂😂😂

AdeGneus commented 1 month ago

@incredible-phoenix246 Don't mind @Ibrahim4Grace he wants to brute force his way into submitting bad issue