* 2 types of users: admin and regular users;
* Admin can input a restaurant and it's lunch menu of the day (2-5 items usually, just a dish name and price);
* Menu changes each day (admins do the updates);
* Users can vote on which restaurant they want to have lunch at;
* Only one vote counted per user;
* If user votes again the same day:
* If it is before 11:00 we asume that he changed his mind;
* If it is after 11:00 then it is too late, vote can't be changed;
* Each restaurant provides new menu each day.
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000 --user [email protected]:admin
curl -s -X DELETE http://localhost:8080/votingsystem/rest/admin/restaurants/100000 --user [email protected]:admin
curl -s -X POST -d '{"name":"New Restaurant"}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/votingsystem/rest/admin/restaurants --user [email protected]:admin
curl -s -X PUT -d '{"name":"Updated"}' -H 'Content-Type: application/json' http://localhost:8080/votingsystem/rest/admin/restaurants/100026 --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003 --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/with?dishes --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/today?today --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/with?dishes --user [email protected]:admin
curl -s -X DELETE http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100004 --user [email protected]:admin
curl -s -X POST -d '{"localDate":"2020-07-05","description":"New Menu"}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus --user [email protected]:admin
curl -s -X PUT -d '{"localDate":"2020-07-06","description":"Updated"}' -H 'Content-Type: application/json' http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003 --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/dishes/100009 --user [email protected]:admin
curl -s -X DELETE http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/dishes/100009 --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/dishes --user [email protected]:admin
curl -s -X PUT -d '{"name": "Updated dish","price": 300}' -H 'Content-Type: application/json' http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/dishes/100010 --user [email protected]:admin
curl -s -X POST -d '{"name": "New dish","price": 150}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/votingsystem/rest/admin/restaurants/100000/menus/100003/dishes --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/users --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/users/100021 --user [email protected]:admin
curl -s -X PUT -d '{"name":"Updated User","email":"[email protected]","password":"updated-password"}' -H 'Content-Type: application/json' http://localhost:8080/votingsystem/rest/admin/users/100021 --user [email protected]:admin
curl -s http://localhost:8080/votingsystem/rest/admin/users/[email protected] --user [email protected]:admin
curl -s -X DELETE http://localhost:8080/votingsystem/rest/admin/users/100021 --user [email protected]:admin
curl -s -i -X POST -d '{}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/votingsystem/rest/profile/votes?restaurantId=100000 --user [email protected]:password
curl -s -X PUT -d '{}' -H 'Content-Type: application/json' http://localhost:8080/votingsystem/rest/profile/votes/100025?restaurantId=100000 --user [email protected]:password
curl -s http://localhost:8080/votingsystem/rest/profile/votes --user [email protected]:password
curl -s http://localhost:8080/votingsystem/rest/profile/restaurants/100000/menutoday --user [email protected]:password
curl -s http://localhost:8080/votingsystem/rest/profile/restaurants/menutoday --user [email protected]:password
curl -s -i -X POST -d '{"name":"New User","email":"[email protected]","password":"test-password"}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/votingsystem/rest/profile/register
curl -s http://localhost:8080/votingsystem/rest/profile --user [email protected]:test-password