You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users should be able to view their current settings on the /settings page. When they press the edit buttons, they should be presented with a form that lets them update these settings. Once they submit the update, these changes should be saved on the database on the page should update to reflect their updated settings.
Assume timeZone, difficulty and languages can be null. We also need to add a Language enum.
Server Side
Update the current UserRepository functions to return all of the data necessary
Currently, we don't have information like languages or difficulty.
Implement the POST /users endpoint.
This may require creating a new UserRepository and UserController
The POST /users endpoint should be authenticated and get the user's identity using req.user
You may want to implement a function like UserRepository.updateUserById(id: string, update: Partial<User>) that only allows for a partial update of the user. They should not be able to update their email or id, but should be able to update things like coding languages, time zone, coding question difficulty, etc.
Client Side
Create an authentication restricted-page on the client at /settings; redirect to index if they're not authenticated.
On this page, they should be able to view their current settings.
When the edit button is clicked, it should change into a form - maybe with a MultiSelect component that lets them choose more than one option where it's applicable, and a SingleSelect component where they can only choose one option.
Story
Users should be able to view their current settings on the
/settings
page. When they press the edit buttons, they should be presented with a form that lets them update these settings. Once they submit the update, these changes should be saved on the database on the page should update to reflect their updated settings.Assume timeZone, difficulty and languages can be null. We also need to add a Language enum.
Server Side
POST /users
endpoint.UserRepository
andUserController
POST /users
endpoint should be authenticated and get the user's identity usingreq.user
UserRepository.updateUserById(id: string, update: Partial<User>)
that only allows for a partial update of the user. They should not be able to update their email or id, but should be able to update things like coding languages, time zone, coding question difficulty, etc.Client Side
/settings
; redirect to index if they're not authenticated.The text was updated successfully, but these errors were encountered: