#!/bin/bash echo " 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 " Plans BEFORE:" curl -s -b cookies.txt http://localhost:8080/api/fixed-plans echo -e "\n\n 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 Plans AFTER:" curl -s -b cookies.txt http://localhost:8080/api/fixed-plans rm -f cookies.txt