Change endpoint (new page)
This commit is contained in:
parent
8eb2494d45
commit
aec05c2c4e
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
cd /home/user2/projects_production/FDEVCommunityEventsMonitoring || { exit 1; echo "changing directory failed"; exit 1; }
|
cd /home/user2/projects_production/FDEVCommunityEventsMonitoring || { exit 1; echo "changing directory failed"; exit 1; }
|
||||||
|
|
||||||
http_response=$(curl -s -L -o calendar.json -w "%{http_code}" "https://calendar.zaonce.net/jsonapi/node/calendar_item")
|
http_response=$(curl -s -L -o calendar-page-2.json -w "%{http_code}" "https://calendar.zaonce.net/jsonapi/node/calendar_item?page%5Boffset%5D=50&page%5Blimit%5D=50")
|
||||||
if [ $http_response != "200" ]; then
|
if [ $http_response != "200" ]; then
|
||||||
git reset --hard | grep -v "HEAD is now at"
|
git reset --hard | grep -v "HEAD is now at"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
else
|
else
|
||||||
cat calendar.json | python3 -m json.tool > .calendar.json
|
cat calendar-page-2.json | python3 -m json.tool > .calendar-page-2.json
|
||||||
mv .calendar.json calendar.json
|
mv .calendar-page-2.json calendar-page-2.json
|
||||||
git add "calendar.json"
|
git add "calendar-page-2.json"
|
||||||
git commit -m "commit" 2>/dev/null >/dev/null
|
git commit -m "commit" 2>/dev/null >/dev/null
|
||||||
git push 2>/dev/null
|
git push 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user