This pull request introduces a validation check in the delete user endpoint to ensure that an ID is provided in the request body. This change aims to prevent attempts to delete a user without specifying an ID, which would lead to an unclear error message.
Summary
Added a validation check in the delete endpoint within the user.routes.js file to verify that an id is present in the request body.
If the id is not provided, the server responds with a 400 status code and a clear error message indicating that "ID is required".
This enhancement improves the API's error handling and user feedback, making the API more robust and easier to use correctly.
Fixes #119.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces a validation check in the delete user endpoint to ensure that an ID is provided in the request body. This change aims to prevent attempts to delete a user without specifying an ID, which would lead to an unclear error message.
Summary
delete
endpoint within theuser.routes.js
file to verify that anid
is present in the request body.id
is not provided, the server responds with a400
status code and a clear error message indicating that "ID is required".Fixes #119.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.