lib/doppelserver/base_server.rb in doppelserver-0.2.4 vs lib/doppelserver/base_server.rb in doppelserver-0.2.5
- old
+ new
@@ -24,11 +24,11 @@
delete '/control/data' do
@@data.clear
end
get '/' do
- body = 'here i am' # TODO: Change this.
+ 'here i am' # TODO: Change this.
end
get '/:endpoint/:id' do
collection, id = params['endpoint'], params['id']
enforce_plural(collection)
@@ -54,10 +54,10 @@
data = begin
JSON.parse(raw_data)
rescue
halt 403, "BAD DATA:\n#{raw_data}"
end
- body = json(id: @@data.add(collection, data))
+ json(id: @@data.add(collection, data))
end
post '/:endpoint/:id' do
request.body.rewind
collection, id = params['endpoint'], params['id']