Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codexpuneet/mock10-airtickets
Hello, This Is my Mock 10 Backend Project Of Flight Booking App
https://github.com/codexpuneet/mock10-airtickets
atlas dotenv expressjs jwt mongodb mongoose nodejs
Last synced: 9 days ago
JSON representation
Hello, This Is my Mock 10 Backend Project Of Flight Booking App
- Host: GitHub
- URL: https://github.com/codexpuneet/mock10-airtickets
- Owner: CodexPuneet
- Created: 2023-02-23T08:57:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T10:05:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T22:23:33.823Z (about 2 months ago)
- Topics: atlas, dotenv, expressjs, jwt, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://happy-dove-jodhpurs.cyclic.app
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Air Tickets Backend
# SignUp
POST - api/user/register - This endpoint should allow users to register.
Body : { "name : "name", "email" : "email", "password" : "password" }Result : Registration successfull
# LogIn
POST - api/user/login - This endpoint should allow users to login.
Body : { "email" : "email", "password" : "password" }Result : { "msg": "Login successful", "token": "token" }
After Login Pass token in headers.authencation to book the tickets
# Flights Routes
GET - /flight/flights - This endpoint should return a list of all available flights.
Result : Flight ArrayGET - api/flight/flights/:id - This endpoint should return the details of a specific flight identified by its ID.
Result : Single FlightPOST - api/flight/flights - This endpoint should allow users to add new flights to the system.
Body : { "airline": "airline", "flightNo": "flightNo", "departure": "departure", "arrival": "arrival", "departureTime": "departureTime", "arrivalTime": "arrivalTime", "seats": 50, "price": 9999 }Result : Flights Added successfull
PATCH - api/flight/flights/:id - This endpoint should allow users to update the details of a specific flight identified by its ID.
Body : { "seats": 67, "price": 13834 }Result : Flights Updated successfull
DELETE - api/flightapi/flights/:id - This endpoint should allow users to delete a specific flight identified by its ID.
Result : Flights Deleted successfull# Booking Routes
POST - api/booking - This endpoint should allow users to book flights with flight_id no.
Body : { "user_id":"_id","flight_id":"_id" }
Result : Flight_id & User_idGET - api/booking/dashboard - This point should list all the bookings so far with the user and flight details.
Result : Booking Array