lib/voom/presenters/demo/echo.rb in voom-presenters-0.2.0 vs lib/voom/presenters/demo/echo.rb in voom-presenters-2.0.0
- old
+ new
@@ -6,9 +6,11 @@
# Echo's back post, delete and put
# Used to demonstrate how the posts(updates), deletes and modifies actions work.
class Echo < Sinatra::Base
post('/_echo_') do
content_type :json
+ params[:echo] = JSON.parse(params[:echo]) if params[:echo]
+ status(params[:status]) if params[:status]
JSON.dump(params)
end
post('/_echo_snackbar_') do
content_type :json