Jerkinator / secondRoll

0 stars 0 forks source link

108 implement preauthorize locally in usercontroller #115

Closed Vurpas closed 5 months ago

Vurpas commented 5 months ago

Added preAuth to updateUser controller. Refactored the controller to go thorugh a DTO that restricts the user to only be able to update firstName, lastName, phoneNumber, adress_street, adress_zip and adress_city. Added if-statement to check if the userId exists and is logged in, if not it gives a proper response. (userId not found) Refactored responses for adding / removing games from wishlist to a generic message. Test in postman

git fetch git checkout 108-implement-preauthorize-locally-in-usercontroller Test all the endpoints, preferably with user logged in, and then admin logged in.