Jack Roybal
https://github.com/ExcuseMeImJack/Relive.git
npm install
npx dotenv sequelize db:create
npx dotenv sequelize db:migrate
npx dotenv sequelize db:seed:all
npm start
POST /api/spots/:spotId/bookings
{"id": 1,"spotId": 1,"userId": 2,"startDate": "2021-11-19","endDate": "2021-11-20","createdAt": "2021-11-19 20:39:36","updatedAt": "2021-11-19 20:39:36"}
GET /api/spots/:spotId/bookings
{"Bookings": [{"spotId": 1,"startDate": "2021-11-19","endDate": "2021-11-20"}]}
POST /api/spots/:spotId/reviews
{"review": "This was an awesome spot!","stars": 5,}
GET /api/spots/:spotId/reviews
{"Reviews": [{"id": 1,"userId": 1,"spotId": 1,"review": "This was an awesome spot!", . . . }]}
GET /api/spots/current
{"Spots": [{"id": 1, "ownerId": 1, "address": "123 Disney Lane" . . . }]}
POST /api/spots/:spotId/images
{"url": "image url", "preview": true}
GET /api/spots/:spotId
{"id": 1, "ownerId": 1, "address": "123 Disney Lane" . . . }
DELETE /api/spots/:spotId
{"message": "Successfully deleted"}
PUT /api/spots/:spotId
{"id": 1, "ownerId": 1, "address": "123 Disney Lane" . . . }
POST /api/spots
{"address": "123 Disney Lane", "city": "San Francisco", . . . }
GET /api/spots
{"Spots": [{"id": 1, "ownerId": 1, "address": "123 Disney Lane" . . . }]}
POST /api/reviews/:reviewId/images
{"id": 1,"url": "image url"}
GET /api/reviews/current
{"Reviews": [{"id": 1,"userId": 1,"spotId": 1,"review": "This was an awesome spot!", . . . }]}
PUT /api/reviews/:reviewId
{"id": 1,"userId": 1,"spotId": 1,"review": "This was an awesome spot!", . . . }]}
DELETE /api/reviews/:reviewId
{"message": "Successfully deleted"}
DELETE /api/bookings/:bookingId
{"message": "Successfully deleted"}
PUT /api/bookings/:bookingId
{"id": 1,"spotId": 1,"userId": 2,"startDate": "2021-11-19", . . . }
GET /api/bookings/current
{"Bookings": [{"id": 1,"spotId": 1,"Spot": { . . . } . . . }]}
DELETE /api/spot-images/:imageId
{"message": "Successfully deleted"}
DELETE /api/review-images/:imageId
{"message": "Successfully deleted"}
POST /api/users
{"id": 1,"firstName": "John","lastName": "Smith", . . . }
POST /api/session
{"user": {"id": 1,"firstName": "John", . . . }}
GET /api/session
{"user": {"id": 1,"firstName": "John", . . . }}