diff --git a/bakery/bricksandmortar/middleman/source/index.html.slim b/bakery/bricksandmortar/middleman/source/index.html.slim index fe2a888..a40ab3a 100755 --- a/bakery/bricksandmortar/middleman/source/index.html.slim +++ b/bakery/bricksandmortar/middleman/source/index.html.slim @@ -18,7 +18,7 @@ label flavour select.form-control name='flavour' ng-init="order.flavour='cola'" ng-model='order.flavour' option value="cola" Cola - option value="stawberry" Stawberry + option value="strawberry" Strawberry option value="glitter" Glitter option value="rum" Rum diff --git a/bakery/counter/app/counter.rb b/bakery/counter/app/counter.rb index 2fde95a..4e0d828 100644 --- a/bakery/counter/app/counter.rb +++ b/bakery/counter/app/counter.rb @@ -4,7 +4,7 @@ module Counter class API < Grape::API version 'v1' format :json - + queue = MessageQueue.new @@ -19,8 +19,8 @@ class API < Grape::API # GET http://xxx/v1/orders - curl -X GET -H "Content-type: application/json" -H "Accept: application/json" http://192.168.99.100:8000/v1/orders # GET http://xxx/v1/orders/1 - curl -X GET -H "Content-type: application/json" -H "Accept: application/json" http://192.168.99.100:8000/v1/orders/1 # POST http://xxx/v1/orders/1 - curl -X POST --data '{"amount": 1,"flavour": "cola","kind": "spacecake"}' -H "Content-type: application/json" -H "Accept: application/json" http://192.168.99.100:8000/v1/orders - # POST http://xxx/v1/orders/1/sweet/done - curl -X POST -H "Accept: application/json" http://192.168.99.100:8000/v1/orders/1/sweet/done - + # POST http://xxx/v1/orders/1/sweet/done - curl -X POST -H "Accept: application/json" http://192.168.99.100:8000/v1/orders/1/sweet/done + resource :orders do @@ -48,7 +48,7 @@ class API < Grape::API desc 'Create a order.' params do requires :kind, type: String, desc: 'The sweet goods', values: ['spacecake', 'bagel', 'donut'] - requires :flavour, type: String, desc: 'Your favorite sweet flavour', values: ['stawberry', 'cola', 'glitter', 'rum'] + requires :flavour, type: String, desc: 'Your favorite sweet flavour', values: ['strawberry', 'cola', 'glitter', 'rum'] requires :amount, type: Integer, desc: 'Amount of sweet stuff.' end post do @@ -66,4 +66,4 @@ class API < Grape::API end end -end \ No newline at end of file +end