There should exist a sourceairport and targetairport in the flight list
curl localhost:8081/reservations | jq
{
"reservation": [
{
"id": 2,
"paymentsuccessful": false,
"passenger": {
"firstname": "tony",
"lastname": "rådyr",
"passportnumber": 12345,
"dateofbirth": "201292",
"email": "",
"creditcardnumber": 0
},
"flightinfo": {
"flightnumber": "BOEING777",
"operatingairlines": "Emirates",
"sourceairport": "Oslo",
"targetairport": "Cancun"
}
}
]
}
curl -X POST localhost:8081/payment/pay -d '{"paymentid": 2}'
curl -X PUT localhost:8081/reservation/2 -d '{"id": 2}'
curl -X GET localhost:8081/reservations | jq
curl -X GET localhost:8081/test | jq
cobra init --pkg-name=gitHub.com/vSivarajah/AirlineReservation
go install github.com/vSivarajah/AirlineReservation
AirlineReservation erik
AirlineReservation get flights