Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajayahara/mock-10-backend
https://github.com/ajayahara/mock-10-backend
Last synced: about 22 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/ajayahara/mock-10-backend
- Owner: ajayahara
- Created: 2023-02-23T08:42:05.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-02-23T09:50:45.000Z (over 1 year ago)
- Last Synced: 2023-07-18T06:30:32.032Z (over 1 year ago)
- Language: JavaScript
- Size: 49.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
--To Register
path-api/register
method-POST
body-{
"name":"Hara",
"email":"[email protected]",
"PassWord":"[email protected]"
}
res u get-{
"name":"Hara",
"email":"[email protected]",
"PassWord":"[email protected]"
}
--to Login
path-api/login
method-POST
body-{
"email":"[email protected]",
"PassWord":"[email protected]"
}
res u get-{
"msg": "Login Successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiNjNmNzJjMmQ3YWYwMjk2NGIzMGRkMzgzIiwiaWF0IjoxNjc3MTQzMTA2fQ.iR_LtYFHzIEtIa-VcurD681QBvaMkr9EWqceteZGd70"
}
--to Create A Flight Data
path-api/flights
method-POST
body-{
"airline": "india",
"flightNo":"12A18",
"departure": "departure",
"arrival": "Arrival",
"departureTime":" Wed Jul 03 2019 19:01:35 GMT+0530 (India Standard Time)",
"arrivalTime":"Wed Jul 03 2019 19:01:30 GMT+0530 (India Standard Time)" ,
"seats": 100,
"price": 2000
}
res u get-{
"airline": "india",
"flightNo": "12B10",
"departure": "departure",
"arrival": "Arrival",
"departureTime": " Wed Jul 03 2019 19:01:35 GMT+0530 (India Standard Time)",
"arrivalTime": "Wed Jul 03 2019 19:01:30 GMT+0530 (India Standard Time)",
"seats": 100,
"price": 2000
}
--to get All flight details
path-api/flights
method-GET
body-
res u get-
An arry of object. Each Object represents the information of one flight
--to get a single flight
path-api/flights/id_of_the_flight
method-GET,
response- A array containing single flight object
--to upadte a flight details
path-api/flights/id_of_the_flight
method-PATCH
body-{
"airline": "india AIRLINE",
"flightNo": "12B10",
"departure": "departure",
"arrival": "Arrival",
"departureTime": " Wed Jul 03 2019 19:01:35 GMT+0530 (India Standard Time)",
"arrivalTime": "Wed Jul 03 2019 19:01:30 GMT+0530 (India Standard Time)",
"seats": 100,
"price": 2000
}
response-Filght Updated
--TO delete a flight
path-api/flights/id_of_the_flight
method-DELETE
body-
response-Filght Deleted;
--To book a flight
path-api/flights/booking
method-POST
body-{
"flight_id":id_of_a_flight
}
headers:{
token:token u got while login
}
response-objec having user and flight id
--to dashboard
path-api/flights/booking
method-GET
headers:{
token:token u got while login
}
response-Array of object
it only shows the booking details of the user whose token is sended in headers