L'API dont vous êtes le héros is an interactive Java API that brings the adventure of "choose your own adventure" stories to life. Users can embark on unique journeys, make decisions at each step, and create dynamic narratives, all while experiencing the nostalgia of classic adventure books.
[X] Implement a DELETE endpoint (e.g., /users/{id} or /users/{username}) to handle user deletion requests.
[X] Ensure that the endpoint validates the user's identity and permissions before allowing deletion (e.g., only admins or the user themselves can delete their account).
[X] Add error handling for scenarios where the user does not exist or the user is unauthorized to delete the account.
[X] Update the user service to handle the logic for deleting a user from the database.
[X] Implement a DELETE endpoint (e.g., /users/{id} or /users/{username}) to handle user deletion requests. [X] Ensure that the endpoint validates the user's identity and permissions before allowing deletion (e.g., only admins or the user themselves can delete their account). [X] Add error handling for scenarios where the user does not exist or the user is unauthorized to delete the account. [X] Update the user service to handle the logic for deleting a user from the database.