Tasks
Backend
- Profile page information will be populated by information obtained from the users profile on the database using a GET request, i.e.(/user/1/profile), will use userId: 1 to find the correct users profile information and pass it on to the frontend to populate the fields.
The URL for the page will be /profile/:id
Snippet of JSON of user data:
{
"first_name": "Nathan",
"last_name": "King",
"biography": "Hello world",
"github_url": "https://github.com/vherus"
}
-
Same as above, post will have user information (should include userId), userId or user info can be used to create the correct end point to reach the users profile
-
Posts will follow the above, a post should have that users information that be used to reach the correct users profile. The "my profile link" will be added to the header upon login, once logged in the current users information will be available from logging in with their token, the token should include the users id which can be used to create the GET request for the link to reach their own profile.
Snippet of JSON of the post data:
{"content": "Hello!", "userId": 1}