hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
181 stars 105 forks source link

[FEAT] Implement Endpoint for User Language Deletion #1074

Open B-Beth opened 3 weeks ago

B-Beth commented 3 weeks ago

Description

To create a DELETE API endpoint that allows users to delete a specific User language .

Acceptance Criteria

  1. The endpoint successfully deletes a specific user language and returns a successful status when Language is deleted
  2. A Bad Request status is returned if the user language cannot be deleted due to dependencies, with a detailed error message.

Purpose

Enable users to delete a specific language from the system by its unique ID.

Requirements

  1. Develop the DELETE endpoint.
  2. Validate that the user language ID provided exists in the system and confirm that the requester has sufficient permissions to perform the deletion.
  3. Check for any dependencies or related records before deleting the user language.
  4. Confirm successful deletion, handle non-existent IDs or dependency constraints, and internal errors with appropriate error messages

Expected Outcome

  1. The endpoint will be secure, efficient, and thoroughly tested to meet the outlined requirements.
  2. The DELETE endpoint will successfully delete the specified resource and return a confirmation message with an OK status.
  3. Proper handling of cases where the user language ID is not found or dependencies prevent deletion, with appropriate status codes and messages.

Bethislearning commented 3 weeks ago

https://github.com/hngprojects/hng_boilerplate_csharp_web/pull/345