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

Create an endpoint for updating an existing job application #10

Open
3 tasks
sero-dev opened this issue Mar 10, 2021 · 0 comments
Open
3 tasks

Create an endpoint for updating an existing job application #10

sero-dev opened this issue Mar 10, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sero-dev
Copy link
Owner

sero-dev commented Mar 10, 2021

Create an endpoint in the JobController to update a job application using its ID.

Be sure to follow the CQRS pattern that is in place, keeping the API call down to a few lines of code with the bulk being inside the Application layer.

You will need to also implement the Update function in the Persistence layer inside the Repository.cs file.

The endpoint should receive the id of the job application as part of the route, with the new object to update inside the body.

If the object is saved successfully, return an Ok
If the id cannot be found, return a NotFound
If the object is invalid, return a UnprocessableEntity

The endpoint should return a status code with no other information.

  • Create an endpoint that will receive an id in the route, and the update job request in the body
  • Create a command for validating and transforming the request into a proper object to be saved in the database
  • Create a repository method for updating a record in the database (you will need to update the IRepository.cs file as well)

Bonus points if you can write tests to cover the new code you are adding. For full coverage, you may need to write a variety of unit tests, API tests, and integration tests.

@sero-dev sero-dev added enhancement New feature or request good first issue Good for newcomers labels Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant