This pull request introduces a new endpoint for deleting users from the system. It includes backend logic to handle the deletion process securely and tests to ensure the functionality works as expected.
Summary
Added a new DELETE endpoint /delete in routes/user.routes.js for user deletion.
Implemented authentication middleware authenticateToken to secure the endpoint.
Created tests in test/user.test.js to validate the deletion process, including scenarios for successful deletion, unauthorized attempts, and deletion of non-existent users.
Utilized chai and chaiHttp for writing comprehensive test cases.
Integrated the user model User from ../models/user.model.js to interact with the database for deletion operations.
Fixes #96.
π 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 new endpoint for deleting users from the system. It includes backend logic to handle the deletion process securely and tests to ensure the functionality works as expected.
Summary
/delete
inroutes/user.routes.js
for user deletion.authenticateToken
to secure the endpoint.test/user.test.js
to validate the deletion process, including scenarios for successful deletion, unauthorized attempts, and deletion of non-existent users.chai
andchaiHttp
for writing comprehensive test cases.User
from../models/user.model.js
to interact with the database for deletion operations.Fixes #96.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.