Anyone has solved Ticket: User Preferences?

Anyone got the validation code for User Preferences ?
Until now (with all unit tests passing) I couldn’t get validation code for User Preferences.
I always receive on the screen: User Preferences: h.json.info is undefined

Hi @brunomathidios,

can you send us a screenshot of your status page ?

Hi @Norberto

removed image that exposed validation keys

Thanks @brunomathidios, I’ll take a look to this.

1 Like

Hi!

It may be the same problem I had in My UsersDao.createUserSession. Instead of “implementing a safeguard against creating a session with the same jwt token”, simply search for an already stored token and return true, otherwise insertOne and return true.

Initially I had the same problem: I was returning false when the user had a session stored in the database.

Hi @brunomathidios,

The user is not getting found after you’ve updated the user preferences. Please check your getUser implementation.

Hi @nicomv! Thanks for your help. I had to change my implementation in UsersDao.createUserSession to execute the find by user_id and return true if the session already exists.
Now I can continue this course, thanks again!

Hi @Norberto ! Thanks for your help. As the other user told me, I just have to change my implementation in UsersDao.createUserSession to execute the find method by user_id and return true if the session already exists.
Now I can continue this course, thank you!