make docker-compose-build
make docker-compose-up
# shutdown
make docker-compose-down
curl -X POST -H 'content-type: application/json' localhost:8080/api/v1/register -d '{"name": "test", "account": "test1", "password":"123456"}' -i
curl -X POST -H 'content-type: application/json' localhost:8080/api/v1/login -d '{"account":"test1","password":"123456"}' -i
JWT_TOEKN=...
curl -X POST -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/wallet -d '{"type":1,"currency_id":1}' -i
JWT_TOEKN=...
curl -X GET -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/wallets -d '{"pagination":{"page":0,"per_page":10},"sort":[{"sort_field":"id","sort_order":"DESC"}]}' -i
JWT_TOEKN=...
ACCOUNT=...
# deposit
curl -X POST -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/wallet/balance -d "{\"type\":1,\"account_number\":\"${ACCOUNT}\",\"amount\":100}" -i
# withdraw
curl -X POST -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/wallet/balance -d "{\"type\":2,\"account_number\":\"${ACCOUNT}\",\"amount\":100}" -i
JWT_TOEKN=...
FROM=...
TO=...
curl -X POST -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/transfer -d "{\"type\":3,\"from\":\"${FROM}\",\"to\":\"${TO}\",\"amount\":100}" -i
JWT_TOEKN=...
curl -X GET -H 'content-type: application/json' -H "authentication: Bearer ${JWT_TOKEN}" localhost:8080/api/v1/transactions -d "{\"account_number\":\"${ACCOUNT}\",\"pagination\":{\"page\":0,\"per_page\":50}}" -i