skantravels/API/integration-tests.sh

9 lines
435 B
Bash
Raw Normal View History

2024-08-14 09:59:53 +01:00
USER_ID=`curl -X POST http://localhost:5287/api/Users -d '{"Email":"hej@example.com","Username":"Gamer","Password":"Gamer123!"}' --header 'Content-Type: application/json'`
TOKEN=`curl -X POST http://localhost:5287/api/Users/login -d '{"Email":"hej@example.com","Password":"Gamer123!"}' --header 'Content-Type: application/json'`
curl http://localhost:5287/api/Users/$USER_ID
curl -X DELETE http://localhost:5287/api/Users/$USER_ID