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
|
@ -39,11 +39,9 @@ class Api::V1::Admin::EmailDomainBlocksController < Api::BaseController
|
|||
|
||||
def destroy
|
||||
authorize @email_domain_block, :destroy?
|
||||
|
||||
@email_domain_block.destroy!
|
||||
log_action :destroy, @email_domain_block
|
||||
|
||||
render json: @email_domain_block, serializer: REST::Admin::EmailDomainBlockSerializer
|
||||
render_empty
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue