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
Each user must have a profile page, just like any social network.
Implementation
Step by step guide on implementation approach.
Preliminary groundwork
It would be nice if this were completed first: #13
Functional groundwork
Schema
New model UserProfile. That model should have fields:
'user' - OneToOne relationship
profile_image - File field
personal_website - URL field
description - Text field
is_private - Boolean field
The model should be tracked using pghistory.
New API endpoints
User GET profile API endpoint should allow getting the user's profile information. A user's profile may be public or private, and the API endpoint should allow access accordingly.
User POST update profile should allow updating a user's profile. A user may only update their profile when properly authenticated.
GET API endpoint which lists all sessions belonging to a user. The user is queried by the request parameter username. If no user is found, nothing is returned.
Summary
Each user must have a profile page, just like any social network.
Implementation
Step by step guide on implementation approach.
Preliminary groundwork
It would be nice if this were completed first: #13
Functional groundwork
Schema
New model
UserProfile
. That model should have fields:profile_image
- File fieldpersonal_website
- URL fielddescription
- Text fieldis_private
- Boolean fieldThe model should be tracked using
pghistory
.New API endpoints
User GET profile API endpoint should allow getting the user's profile information. A user's profile may be public or private, and the API endpoint should allow access accordingly.
User POST update profile should allow updating a user's profile. A user may only update their profile when properly authenticated.
GET API endpoint which lists all sessions belonging to a user. The user is queried by the request parameter
username
. If no user is found, nothing is returned.Functional implementation
The rest of the implementation needs to happen on the front-end. More on that in a JR React issue: 0x213F/jukebox-radio-react#6
The text was updated successfully, but these errors were encountered: