Objective
A logged in admin should be able to reject a submitted artwork. Makes changes to the relevant artwork's featured field: rejection_reason
Tasks
Backend
Check out the structure of the artworks table, what fields exist, etc
Follow instructions in the route.ts file for this endpoint (within /api)
Study what are the correct response headers, status codes, and messaging for this endpoint. Some starters exist within the /constants directory. Feel free to use them or change them while understanding that we should strive for consistency across our messages
Acceptance Criteria
✅ A call to the endpoint (using a tool like postman) will modify the required fields
✅ Only a logged in admin can utilize the API
✅ Study what response status codes and messaging is most helpful (our frontend will process this and we'll use them to show end users what just happened and why!!)
✅ You're able to understand what makes a PATCH request different from a POST. Is this the right one to use here?
Resource(s)
Existing Prisma schema
Existing DB table design
https://restfulapi.net/http-status-codes/
Objective
A logged in admin should be able to reject a submitted artwork. Makes changes to the relevant artwork's featured field: rejection_reason
Tasks
Backend
Check out the structure of the artworks table, what fields exist, etc
Follow instructions in the route.ts file for this endpoint (within /api)
Study what are the correct response headers, status codes, and messaging for this endpoint. Some starters exist within the /constants directory. Feel free to use them or change them while understanding that we should strive for consistency across our messages
Acceptance Criteria
✅ A call to the endpoint (using a tool like postman) will modify the required fields
✅ Only a logged in admin can utilize the API
✅ Study what response status codes and messaging is most helpful (our frontend will process this and we'll use them to show end users what just happened and why!!)
✅ You're able to understand what makes a PATCH request different from a POST. Is this the right one to use here?
Resource(s)
Existing Prisma schema
Existing DB table design
https://restfulapi.net/http-status-codes/