Class: Cangaroo::EndpointController

Inherits:
ApplicationController show all
Defined in:
app/controllers/cangaroo/endpoint_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
14
15
16
17
# File 'app/controllers/cangaroo/endpoint_controller.rb', line 10

def create
  if @command.success?
    render json: @command.object_count, status: 202
  else
    render json: { error: @command.message },
           status: @command.error_code
  end
end