Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bakery/bricksandmortar/middleman/source/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions bakery/counter/app/counter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Counter
class API < Grape::API
version 'v1'
format :json


queue = MessageQueue.new

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -66,4 +66,4 @@ class API < Grape::API
end

end
end
end