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

[FEAT] Update A job post by Id #158

Closed
3 tasks
uloamaka opened this issue Jul 17, 2024 · 2 comments · May be fixed by #623
Closed
3 tasks

[FEAT] Update A job post by Id #158

uloamaka opened this issue Jul 17, 2024 · 2 comments · May be fixed by #623
Assignees
Labels
Approved - 1st Mentor Set when at least one mentor has approved Approved - 2nd Mentor Set when a second mentor approves feature In-progress This issue is being worked on

Comments

@uloamaka
Copy link

uloamaka commented Jul 17, 2024

Description

Implement an Api endpoint to update a job post detail, incase of any omission in job details.

Acceptance Criteria

  • The endpoint should be accessible at api/v1/jobs/:id
  • The endpoint should accept HTTP PATCH requests.
  • The endpoint should check that the user has the appropriate permissions.
  • The endpoint should validate all data passed in the body of the request
  • Requests to the endpoint must include a valid authentication token in the Authorization header. Authorization: Bearer
  • Given a request with a valid job post ID, when the user is authenticated and authorized, the system should update the user with a status code of 200
  • Given a request with an invalid or non-existent user ID, when the user is authenticated and authorised, the system should return a 404 Not Found status.

Request

  • Endpoint: api/v1/jobs/:id
  • Request Body:
{
  "title": "Job Title",
  "description": "Job Description",
  "location": "Job location",
  "salary": "String",
  "job_type": "String",
  "company_name": "String"
}
  • Parameters: (jobpostId) id : string

Expected Outcome

  • Successful Response
{
     "message": "Job details updated successfully",
     "status_code": 200,
     "data": {
           "title": "Job Title",
           "description": "Job Description",
           "location": "Job location",
           "salary": "String",
           "job_type": "String",
           "company_name": "String",
           "created_at": "Timestamp",
           "updated_at": "Timestamp"
         }
} 
  • Error Response
{
  "status_code": 400,
  "message": ["validation error message"],
  "error": "Bad Request"
} 

Purpose

Enable updating of a posted job details, incase of any error(typo, etc)

Requirements

  • Develop server-side logic to update a single job post
  • Ensure compliance with security standards for handling user information.

Checklist

  • Define API endpoint to update job post details.
  • Implement logic to update job post details in the database.
  • Handle success and error responses.

Unit tests

  • Successful response with valid id
  • invalid job post id
  • Miissing job post id
  • invalid request body
  • Appropriate status code
@markessien markessien added the Approved - 1st Mentor Set when at least one mentor has approved label Jul 18, 2024
@uloamaka
Copy link
Author

uloamaka commented Jul 18, 2024

TEAM SISU:
members slack name:
1.@uloamaka === GO(gin)
2.@Akintola Olamilekan === Nodejs(nest.js)
3.@stephen Kihuni === Python(fastApi)
4.@Alemsbaja === PHP(laravel)

@zxenonx zxenonx added the Approved - 2nd Mentor Set when a second mentor approves label Jul 18, 2024
@uloamaka uloamaka moved this from Backlogs to Mentors Approved in Boilerplate Issues Jul 18, 2024
@uloamaka uloamaka self-assigned this Jul 18, 2024
@uloamaka uloamaka assigned uloamaka and unassigned uloamaka Jul 18, 2024
@uloamaka uloamaka removed their assignment Jul 18, 2024
@horlami228
Copy link

Let's go 💪🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved - 1st Mentor Set when at least one mentor has approved Approved - 2nd Mentor Set when a second mentor approves feature In-progress This issue is being worked on
Projects
Status: Mentors Approved
5 participants