Air Ticket Booking
- Nodejs
- Nodemon
- express
- bcrypt
- USER ABLE TO REGISTER
- USER ABLE TO LOGIN
- AUTHENTICATION PROVIDED FOR VISTING DIFFERENT ROUTES
- USER BOOK THE FLIGHT
- USER GET THE FLIGHT
- USER UPDATE THE FLIGHT
- USER DELETE THE FLIGHT
- Mongodb
METHOD | ENDPOINT | DESCRIPTION | STATUS CODE |
---|---|---|---|
POST | /api/register | This endpoint should allow users to register. | 201 |
POST | /api/login | This endpoint should allow users to login. | 201 |
GET | /api/flights | This endpoint should return a list of all available flights. | 200 |
GET | /api/flights/:id | This endpoint should return the details of a specific flight identified by its ID. | 200 |
POST | /api/flights | This endpoint should allow users to add new flights to the system. | 201 |
PUT / PATCH | /api/flights/:id | This endpoint should allow users to update the details of a specific flight identified by its ID. | 204 |
DELETE | /api/flights/:id | This endpoint should allow users to delete a specific flight identified by its ID. | 202 |
POST | /api/booking | This endpoint should allow the user to book flights. | 201 |
GET | /api/dashboard | This point should list all the bookings so far with the user and flight details. | 200 |
👥👤
{
"name": "String",
"email": "String",
"password": "String"
}
{
"name": "ayushi",
"email": "ayushi12@gmail.com",
"password": "1234"
}
{
"name": "ayushi",
"email": "ayushi12@gmail.com",
}
http://localhost:8080/register
{
"'airline'": "String",
"flightNo": "String",
"departure": "String",
"arrival": "String",
"departureTime": "Date",
"arrivalTime": "Date",
"seats": Number,
price: Number
}
{
"'airline'": "ayushi lines",
"flightNo": "78",
"departure": "shimla",
"arrival": "goa",
"departureTime": "05-16-2004",
"arrivalTime": "03-12-2000",
"seats": 9,
"price": 9000
}
-http://localhost:8080/flights
-http://localhost:8080/flights