Method: Xapit::Server::App#action

Defined in:
lib/xapit/server/app.rb

#action(command, json) ⇒ Object



14
15
16
17
# File 'lib/xapit/server/app.rb', line 14

def action(command, json)
  data = Xapit.symbolize_keys(JSON.parse(json))
  render :content => Xapit.database.send(command, data).to_json
end