mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-19 14:01:03 +08:00
fixes hound
This commit is contained in:
parent
53cdbc2638
commit
60b0d69a72
1 changed files with 6 additions and 10 deletions
|
@ -80,17 +80,15 @@ class SamplesController < ApplicationController
|
|||
|
||||
errors.delete_if { |k, v| v.blank? }
|
||||
if errors.empty?
|
||||
format.json {
|
||||
render json: {
|
||||
format.json
|
||||
render json:
|
||||
id: sample.id,
|
||||
flash: t(
|
||||
'samples.create.success_flash',
|
||||
sample: sample.name,
|
||||
organization: @organization.name
|
||||
)
|
||||
},
|
||||
),
|
||||
status: :ok
|
||||
}
|
||||
else
|
||||
format.json { render json: errors, status: :bad_request }
|
||||
end
|
||||
|
@ -237,17 +235,15 @@ class SamplesController < ApplicationController
|
|||
# Now we can destroy empty scfs
|
||||
scf_to_delete.map(&:destroy)
|
||||
|
||||
format.json {
|
||||
render json: {
|
||||
format.json
|
||||
render json:
|
||||
id: sample.id,
|
||||
flash: t(
|
||||
'samples.update.success_flash',
|
||||
sample: sample.name,
|
||||
organization: @organization.name
|
||||
)
|
||||
},
|
||||
),
|
||||
status: :ok
|
||||
}
|
||||
else
|
||||
format.json { render json: errors, status: :bad_request }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue