Skip to content

build-week-apis/restaurant-passport

Repository files navigation

Restaurant Passport

Delpoyed URL: https://build-restaurant-passport.herokuapp.com

Models

users

{
	id: integer, do not send this is automatically generated
	username: string, required
	password: string, required
	email: string, required
}

cities

{
	id: integer, do not send this is automatically generated
	name: string
}

restsurants

{
    	name: string, required
    	city: string, required
    	address: string, required
   	description: string, required
    	city_id integer, required, references id of city
}

End Points

Auth Routes

Method Endpoint Token Required Description
POST /users/register no Registers a new user
Required: username, password, and department.
Returns id, username, and email.
POST /users/login no Required: username and password
Signs in user and returns a token and userId

Cities Routes

Method Endpoint Token Required Description
GET /cities yes Returns all cities
POST /cities/ yes Reqired: name
Adds a city to the database
POST /cities/restaurants yes Required: name. city, address, description, city_id
Adds a restaurant to the database
GET /cities/:id/restaurants yes Returns name and id of restaurants in a city by city id
GET /cities/restaurants/:id yes Returns a restaurant by id

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published