|
|
|
@@ -14,13 +14,14 @@ class Admins::IdentityVerificationsController < Admins::BaseController |
|
|
|
end |
|
|
|
|
|
|
|
def update |
|
|
|
if @identity_verification.update(update_params) |
|
|
|
if update_params[:state] == "已拒绝" && update_params[:description].blank? |
|
|
|
flash[:danger] = '拒绝理由不能为空' |
|
|
|
render 'edit' |
|
|
|
else |
|
|
|
UserAction.create(action_id: @identity_verification.id, action_type: "UpdateIdentityVerifications", user_id: current_user.id, :ip => request.remote_ip, data_bank: @identity_verification.attributes.to_json) |
|
|
|
@identity_verification.update(update_params) |
|
|
|
redirect_to admins_identity_verifications_path |
|
|
|
flash[:success] = "更新成功" |
|
|
|
else |
|
|
|
redirect_to admins_identity_verifications_path |
|
|
|
flash[:danger] = "更新失败" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|