curl -s http://localhost:8080/rest/admin/users -u admin@gmail.com:admin
curl -s -X POST -H "Content-Type: application/json"\ -d '{"name":"newUser","email":"newUser@yandex.ru","password":"passwordNew","roles":["ROLE_USER"]}'\ http://localhost:8080/rest/admin/users -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/users/100000 -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/users/by?email=user3@yandex.ru -u admin@gmail.com:admin
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"name":"User1Updated","email":"user1@yandex.ru","password":"password1","roles":["ROLE_USER"]}'\ http://localhost:8080/rest/admin/users/100000 -u admin@gmail.com:admin
curl -s -X DELETE http://localhost:8080/rest/admin/users/100000 -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/profile -u user3@yandex.ru:password3
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"name":"User2Updated","email":"user2@yandex.ru","password":"password2"}'\ http://localhost:8080/rest/profile -u user2@yandex.ru:password2
curl -s -X DELETE http://localhost:8080/rest/profile -u user3@yandex.ru:password3
curl -s http://localhost:8080/rest/admin/restaurants -u admin@gmail.com:admin
curl -s -X POST -H "Content-Type: application/json"\ -d '{"name":"newRestaurant"}' http://localhost:8080/rest/admin/restaurants -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/restaurants/100004 -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/restaurants/100004/detailed -u admin@gmail.com:admin
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"name":"restaurant1Updated"}' http://localhost:8080/rest/admin/restaurants/100004 -u admin@gmail.com:admin
curl -s -X DELETE http://localhost:8080/rest/admin/restaurants/100004 -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/profile/restaurants/100004 -u user1@yandex.ru:password1
curl -s http://localhost:8080/rest/profile/restaurants/100004/detailed -u user1@yandex.ru:password1
curl -s http://localhost:8080/rest/profile/restaurants -u user1@yandex.ru:password1
curl -s http://localhost:8080/rest/admin/restaurants/100004/meals -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/restaurants/100004/meals/100007 -u admin@gmail.com:admin
curl -s -X DELETE http://localhost:8080/rest/admin/restaurants/100004/meals/100007 -u admin@gmail.com:admin
curl -s -X POST -H "Content-Type: application/json"\ -d '{"name":"newMeal","dateTime": "2018-05-01T08:00:00","price":"600"}'\ http://localhost:8080/rest/admin/restaurants/100004/meals -u admin@gmail.com:admin
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"name":"meatUpdated","dateTime": "2018-05-01T08:00:00","price":"10"}'\ http://localhost:8080/rest/admin/restaurants/100004/meals/100007 -u admin@gmail.com:admin
In filtered queries with startDate and endDate if one of the dates not exists it's substituted by MIN_DATE (0-1-1) and MAX_DATE (3000-1-1) accordingly
curl -s http://localhost:8080/rest/admin/users/100000/votes/100013 -u admin@gmail.com:admin
Update couldn't be done after 11:00 am
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"date":"2018-05-01","userId":100000,"restaurantId":100005}'\ http://localhost:8080/rest/admin/users/100000/votes/100013 -u admin@gmail.com:admin
curl -s -X POST -H "Content-Type: application/json"\ -d '{"date":"2018-05-03","userId":100000,"restaurantId":100006}'\ http://localhost:8080/rest/admin/users/100000/votes -u admin@gmail.com:admin
curl -s -X DELETE http://localhost:8080/rest/admin/users/100000/votes/100013 -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/votes -u admin@gmail.com:admin
curl -s "http://localhost:8080/rest/admin/votes/filter?startDate=2018-05-01&endDate=2018-05-01"\ -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/users/100000/votes -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/admin/restaurants/100006/votes -u admin@gmail.com:admin
curl -s "http://localhost:8080/rest/admin/users/100000/votes/filter?startDate=2018-05-01&endDate=2018-05-03"\ -u admin@gmail.com:admin
curl -s "http://localhost:8080/rest/admin/restaurants/100006/votes/filter?startDate=2018-05-01&endDate=2018-05-03"\ -u admin@gmail.com:admin
curl -s http://localhost:8080/rest/profile/votes/100013 -u user1@yandex.ru:password1
Update couldn't be done after 11:00 am
curl -s -X PUT -H "Content-Type: application/json"\ -d '{"date":"2018-05-01","userId":100000,"restaurantId":100005}'\ http://localhost:8080/rest/profile/votes/100013 -u user1@yandex.ru:password1
curl -s -X POST -H "Content-Type: application/json"\ -d '{"date":"2018-05-03","userId":100000,"restaurantId":100006}'\ http://localhost:8080/rest/profile/votes -u user1@yandex.ru:password1
curl -s -X DELETE http://localhost:8080/rest/profile/votes/100013 -u user1@yandex.ru:password1
curl -s http://localhost:8080/rest/profile/votes -u user1@yandex.ru:password1
curl -s "http://localhost:8080/rest/profile/votes/today"\ -u user1@yandex.ru:password1