Skip to content

Mickyfen17/build-your-own-backend

Repository files navigation

build-your-own-backend

Database used

Open Beer DB

Endpoints

  • All POST/PUT/DELETE/PATCH endpoints are protected by JWT's
  • POST categories
  • Allows the user to add a new beer category by passing though name in the request body.
  • POST styles
  • Allows the user to add a new beer style by passing though name and category_id in the request body.
  • POST beers
  • Allows the user to add a new beer by passing though name, cat_id & style_id in the request body.
  • POST breweries
  • Allows the user to add a new brewery by passing though name, address1, city, state, code & country in the request body.
  • DELETE categories/:id
  • Allows the user to delete an existing beer category by passing though the beer category ID in the request body.
  • DELETE beers/:id
  • Allows the user to delete an existing beer by passing though the beer ID in the request body.
  • PATCH styles/:id
  • Allows the user to update an existing beer style by passing either name or beer category_id in the request body.
  • PATCH breweries/:id
  • Allows the user to update an existing brewery by passing either name, address1, city, state, code, or country in the request body.
  • PUT categories/:id
  • Allows the user to update an existing beer category by passing name in the request body.
  • PUT beers/:id
  • Allows the user to update an existing beer style by passing name, cat_id, style_id & brewery_id in the request body.

Tables

Categories

id category_id name
1 1 British Ale
2 2 Irish Ale
3 3 North American Ale

Styles

id style_id name category_id
1 1 New Classic Style of Pale Ale 1
2 2 Ordinary Bitter 1
3 3 English-Style India Pale Ale 1

Beers

id beer_id name cat_id style_id brewery_id
1 1 Hocus Pocus 11 116 812
2 2 Grimbergen Blonde null null 264
3 3 Widdershins Barleywine null null 779

Breweries

id brewery_id name address1 city state code country
1 1 (512) Brewing Company 407 Radam, F200 Austin Texas 78745 US
2 2 21st Amendment Brewery Cafe 563 Second Street San Francisco California 94107 US
3 3 3 Fonteinen Brouwerij Hoogstraat 2A Beersel null null Belgium

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published