Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed delete Job and update user status. #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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