20 lines
673 B
Bash
20 lines
673 B
Bash
#!/bin/bash
|
||
|
||
echo "<22><><EFBFBD> Logging in..."
|
||
curl -s -c cookies.txt -X POST http://localhost:8080/api/auth/login \
|
||
-H "Content-Type: application/json" \
|
||
-d '{"email":"test@skymoney.com","password":"password123"}' > /dev/null
|
||
|
||
echo "<22><><EFBFBD> Plans BEFORE:"
|
||
curl -s -b cookies.txt http://localhost:8080/api/fixed-plans
|
||
|
||
echo -e "\n\n<><6E><EFBFBD> Posting $1000 income..."
|
||
curl -s -b cookies.txt -X POST http://localhost:8080/api/income \
|
||
-H "Content-Type: application/json" \
|
||
-d "{\"amountCents\": 100000, \"postedAt\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\", \"note\": \"Test\"}"
|
||
|
||
echo -e "\n\n<><6E><EFBFBD> Plans AFTER:"
|
||
curl -s -b cookies.txt http://localhost:8080/api/fixed-plans
|
||
|
||
rm -f cookies.txt
|