Ticket User Preferences

Hello,

I got problems with this ticket. The UserPreferencesTest works well, but the application doesn’t.
The “logout” and “save” actions are not performed correctly.
They give the following error:

logout
{timestamp: “2021-01-28T19:28:30.530+0000”, status: 400, error: “Bad Request”, message: “Missing request header ‘Authorization’ for method parameter of type String”, path: “/api/v1/user/logout”}
error: “Bad Request”
message: “Missing request header ‘Authorization’ for method parameter of type String”
path: “/api/v1/user/logout”
status: 400
timestamp: “2021-01-28T19:28:30.530+0000”

save (update-preferences)
{timestamp: “2021-01-28T19:31:26.662+0000”, status: 400, error: “Bad Request”,…}
error: “Bad Request”
message: “Missing request header ‘Authorization’ for method parameter of type String”
path: “/api/v1/user/update-preferences”
status: 400
timestamp: “2021-01-28T19:31:26.662+0000”

The corresponding methods (logoutUser(…), updateUserPreferences(…)) of the mflix.api.services.UserService class are never invoked!
The methods logout(…) and updateUserPreferences(…) of the mflix.api.controllers.UserController class are never invoked!

Do you have any idea about it?

Thanks

1 Like

Having the same issue: unit tests work correctly, test on the localhost:5000/status works, but UI doesn’t => for logged in user when i click on logout, deleteUserSession() method isn’t called.
Did you manage to find any solution?