Alright, this one needed a little work in both back- and frontend. I had to change our rating-system in backend so that it's based on username and not user ID. So here's how to test it:
BACKEND
First, open up our backend-project in IntelliJ.
Open up a terminal in IntelliJ and do a git fetch.
Now do: git checkout testing-rating-with-username
Run the server.
FRONTEND
Open up our frontend project in VScode.
Open up a terminal and do git fetch.
Now do: git checkout 31-create-rating-component
Run the program and log in to a user. OBS: Make sure that you clear your storage first, and make sure you do not log into a user that is an admin!
Alright, this one needed a little work in both back- and frontend. I had to change our rating-system in backend so that it's based on username and not user ID. So here's how to test it:
BACKEND
FRONTEND
To double check that the rating went through, go to our MongoDB Cloud and check the chosen user's "ratings"-array. If your rating is there: success!