10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'app/controllers/opsworks_helpers/application_controller.rb', line 10
def status
if command_block = OpsworksHelpers.status_checks.presence
checks = StatusChecks.new(command_block)
checks.execute
@errors = checks.errors
end
if @errors.present?
render json: {
status: :internal_server_error,
message: 'Something went wrong',
errors: @errors
}, status: :internal_server_error
else
render json: {status: :ok, message: 'Everything is awesome!'}
end
end
|