Fix admin APIs returning deleted object instead of empty object upon delete (#19479)
Fix #19153
This commit is contained in:
parent
5724da0780
commit
276b85bc91
6 changed files with 7 additions and 21 deletions
|
@ -40,7 +40,6 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
|||
|
||||
def update
|
||||
authorize @domain_block, :update?
|
||||
|
||||
@domain_block.update(domain_block_params)
|
||||
severity_changed = @domain_block.severity_changed?
|
||||
@domain_block.save!
|
||||
|
@ -53,7 +52,7 @@ class Api::V1::Admin::DomainBlocksController < Api::BaseController
|
|||
authorize @domain_block, :destroy?
|
||||
UnblockDomainService.new.call(@domain_block)
|
||||
log_action :destroy, @domain_block
|
||||
render json: @domain_block, serializer: REST::Admin::DomainBlockSerializer
|
||||
render_empty
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue