Skip to content
Snippets Groups Projects
Commit 70086743 authored by Rickard Loland's avatar Rickard Loland
Browse files

Merge branch 'master' of https://git.gvk.idi.ntnu.no/sindre0830/xyz-project into master

parents c24c52c1 23302cc6
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,13 @@ will show the post as well as its comments. To create a post the user will have
no user already exists. Once logged in the user will be able to post as well as see their profile
page, where username, picture and all posts posted by the user are shown.
#### Implementation of Session in Server.js
Session is implemented, but does not work correctly.
When 8081 is accessed directly there is no problem saving and accessing the userId saved on req.session.userId, but when accessed from frontend (8080) the session is not accessible.
The method we have chosen to use for implementing session was probably not the optimal and we dont know if it is an error with the implementation or that the method is not meant for this kind of use.
throughout the code we therefore have changed "req.session.userId" with "1", to simulate each function as logged in with user "1".
/redirectLogin and /redirectHome stillworks because it aparantly allow that req.session.userId is "undefined" insted of empty.
## Project description
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment