Two routes are to be created:
- POST
/users/ban/{id} - accessible only for admins. This route should take in user_id as params and update the user's status from verified to banned.
- POST
/users/unban/{id} - accessible only for admins. This route should take in user_id as params and update the user's status from banned to verified.
- POST
users/update - accessible for authorized users. This route will allow users to change their name, phone, address and username.
Make sure you use POST instead of PUT as HTML forms do not support methods other than GET and POST.
Two routes are to be created:
/users/ban/{id}- accessible only for admins. This route should take in user_id as params and update the user's status from verified to banned./users/unban/{id}- accessible only for admins. This route should take in user_id as params and update the user's status from banned to verified.users/update- accessible for authorized users. This route will allow users to change their name, phone, address and username.