enable gang rename

This commit is contained in:
Bilal
2020-10-10 01:18:57 +03:00
parent 824790c178
commit b048cb2392

View File

@@ -18,12 +18,15 @@ class GangsController < ApplicationController
end
def update
if gang_params[:chip_scale].to_i.positive?
Gang.update(gang_params)
if params[:id]
gang = Gang.find(params[:id])
gang.update!(gang_params)
json_response onboarded: true
else
error_response :bad_request
end
rescue StandardError
error_response :bad_request
end
private