Include field description on userSchema for expert
Route /api/v1/users/updateMe for updating current logged-in users
How to test
Start the backend server
Execute on terminal
curl -X PATCH 'localhost:5000/api/v1/users/updateMe' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxMTNjOWJkZjAwNWY3MzRhY2NhMTJhOSIsImlhdCI6MTYyOTQzNDEzOCwiZXhwIjoxNjI5NjA2OTM4fQ.x_EwtNZabubz8veJaY44LLnojd_tzAtaI6ba2ZbsGAs' \
-H 'Content-Type: application/json' \
-d '{"name": "UPDATE NAME 1", "avatar": "UPDATE IMAGE 1", "description": "WILL NOT APPEAR BECAUSE NORMAL USER 1"}'
Expected Result
the logged-in user will have name change to "UPDATE NAME 1" and avatar to "UPDATE IMAGE 1". description will not include in the response because the token is for normal user
Changelog
description
onuserSchema
for expert/api/v1/users/updateMe
for updating current logged-in usersHow to test
Expected Result
logged-in user
will havename
change to "UPDATE NAME 1" andavatar
to "UPDATE IMAGE 1".description
will not include in the response because the token is for normal user