cors
dotenv
express
helmet
jsonwebtoken
knex
knex-cleaner
morgan
pg
sqlite3
/api/auth
Method | Endpoint | Description | Requirements |
---|---|---|---|
POST | /register | Registers a new User | username(str), password(str), email(str), location(str) |
POST | /login | Signs in a User | username(str), password(str) |
/api/users
Method | Endpoint | Description | Requirements |
---|---|---|---|
GET | / | Gets all users | |
GET | /:id | Gets User with all info | |
GET | /:id/restaurants | Gets all Restaurants created by User | |
GET | /:id/reviews | Get all reviews by User | |
PUT | /:id | Updates an User | |
DELETE | /:id | Deletes an User |
/api/restaurants
Method | Endpoint | Description | Requirements | Optional |
---|---|---|---|---|
GET | / | Gets all Restaurants | ||
GET | /:id | Gets a Restaurant | ||
GET | /:id/ratings | Gets all ratings for Restaurant | ||
GET | /:id/reviews | Gets all reviews for Restaurant | ||
POST | / | Adds a new restaurant | name(str), cuisine(str), location(int), foodie_id(int) | img(str), hours(int), review(str) |
PUT | /:id | Updates an Restaurant | ||
DELETE | /:id | Deletes an Restaurant |
/api/reviews
Method | Endpoint | Description | Requirements | Optional |
---|---|---|---|---|
POST | / | Adds a new review | menu_item(str), rating(str), review(str), foodie_id(int), restaurant_id(int) | img(str), price(str), cuisine(str) |
PUT | /:id | Updates an review | ||
DELETE | /:id | Deletes an review |
/api/ratings
Method | Endpoint | Description | Requirements | Optional |
---|---|---|---|---|
POST | / | Adds a new rating | restaurant_id(int), foodie_id(int) | food_rating(str), drinks_rating(str), decor_rating(str), service_rating(str), cleanliness_rating(str), vibe(str) |
PUT | /:id | Updates an rating | ||
DELETE | /:id | Deletes an rating |