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 User Preference #164

Open
Vhickyy opened this issue Jul 23, 2024 · 2 comments
Open

[FEAT] Update User Preference #164

Vhickyy opened this issue Jul 23, 2024 · 2 comments
Labels

Comments

@Vhickyy
Copy link

Vhickyy commented Jul 23, 2024

Description

Implement an API endpoint that allows users to update his or her preferences. This endpoint allows authenticated user to update their preference.

Endpoint Feature

  • This endpoint enables authenticated users to change their own preference.

Acceptance Criteria

  • The endpoint should be accessible at PUT /api/v1/user/preference.
  • User must be authenticated.
  • The request body should contain data to be updated.

Successful Response

The system returns the 200 "success" status code if the update is successful.

{
  "status": "success",
  "message": "Preference successfully updated",
  "status_code": 200
}

Error Handling:

Error while updating preference to database

{
    "status": "unsuccessful",
    "status_code": 500,
    "message": "Internal Server Error."
}

Testing:

unit tests
It should fail with incorrect preference data.
User Preference should be updated successfully with correct details.

@Vhickyy Vhickyy changed the title Update User Preference [FEAT] Update User Preference Jul 23, 2024
@incredible-phoenix246
Copy link
Contributor

update this @Vhickyy

use md format

@Vhickyy
Copy link
Author

Vhickyy commented Jul 23, 2024

@incredible-phoenix246 please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants