{message: 'Destination with id <id> successfully posted', newDestination: <Object with destination info just posted>}
Modify single trip
http://localhost:3001/api/v1/updateTrip
POST
{id: <number>, status:<String of 'approved' or 'pending', suggestedActivities: <Array of strings>}Only a statusora suggestedActivities property is required for a successful request
{message: 'Trip #<id> has been modified', updatedTrip: <Object with newly updated data>}
Delete single trip
http://localhost:3001/api/v1/trips/<id>where<id> will be a number of a trip's id
https://github.com/users/Sulton88Mehron90/projects/2/views/4?layout=board
travel-tracker-api
This repo was created to be used with the travel-tracker project.
Set Up
Clone this down, and
cd
into it. Then run:npm install
npm start
Endpoints
http://localhost:3001/api/v1/travelers
travelers
property containing an array of all travelershttp://localhost:3001/api/v1/travelers/<id>
where<id>
will be a number of a traveler's idhttp://localhost:3001/api/v1/trips
trips
property containing an array of all tripshttp://localhost:3001/api/v1/destinations
destinations
property containing an array of all destinationshttp://localhost:3001/api/v1/trips
{id: <number>, userID: <number>, destinationID: <number>, travelers: <number>, date: <string 'YYYY/MM/DD'>, duration: <number>, status: <string 'approved' or 'pending'>, suggestedActivities: <array of strings>}
{message: 'Trip with id <id> successfully posted', newTrip: <Object with trip info just posted>}
http://localhost:3001/api/v1/destinations
{id: <number>, destination: <string>, estimatedLodgingCostPerDay: <number>, estimatedFlightCostPerPerson: <number>, image: <string>, alt: <string>}
{message: 'Destination with id <id> successfully posted', newDestination: <Object with destination info just posted>}
http://localhost:3001/api/v1/updateTrip
{id: <number>, status:<String of 'approved' or 'pending', suggestedActivities: <Array of strings>}
Only a status or a suggestedActivities property is required for a successful request{message: 'Trip #<id> has been modified', updatedTrip: <Object with newly updated data>}
http://localhost:3001/api/v1/trips/<id>
where<id>
will be a number of a trip's id