Skip to content

Conversation

@rohity20
Copy link

@rohity20 rohity20 commented Oct 1, 2023

Fixed #1

The issue in the code is that when a person is selected for a job and the recruiter deletes that job, the code does not update the person's job status, leaving them unable to apply for other jobs.
I have provided an API function for handling job deletion. It starts by checking if the authenticated user is a "recruiter" and, if not, returns a 401 Unauthorised response. If the user is a recruiter, it attempts to delete a job with the specified ID belonging to that user. If the job is successfully deleted, it updates the status of related applications to "deleted" and responds with a success message. In case of any errors, it returns a 400 Bad Request response with the error details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Delete Job, update user status bug

2 participants