Closed Ukeme-Edet closed 3 weeks ago
this is unclear how preferences are stored. Are they in a different table from the user model?
@markessien The preferences will be stored as a JSON field within the user table
I assume that you are validating the input for preferences too ?
Yes @jovialcore , The inputs will be validated... Thank you
Description
Implement a RESTful API endpoint to handle partial updates of user profile settings. This endpoint will allow authenticated users to modify specific parts of their profile information, such as name, email, or preferences. User preferences will be stored as a JSON field in the user table of the database.
Acceptance Criteria
API Endpoint Implementation:
/api/v1/users/:id
.Data Validation and Authorization:
Updating User Profile:
Response:
Request Example:
PATCH
/api/users/profile
Successful Response:
Error response:
Server Error:
Purpose
Provide a secure and efficient backend service for users to update specific parts of their profile settings, ensuring data validation and maintaining user information integrity.
Requirements
Database Schema
Expected Outcome
A fully functional API endpoint that securely handles partial user profile updates, maintaining data integrity and providing clear feedback on the success or failure of update attempts.
Status Codes:
Testing