I added some middleware that basically for all the api endpoints checks if the user is logged in and for a few checks if the user is an admin by checking the isAdmin boolean in the database from users. Also not sure if this will play nice with the front end.
I added some middleware that basically for all the api endpoints checks if the user is logged in and for a few checks if the user is an admin by checking the isAdmin boolean in the database from users. Also not sure if this will play nice with the front end.