[CW-1342]: Inbox deletion in background job (#6708)

This commit is contained in:
Tejaswini Chile
2023-03-20 13:46:07 +05:30
committed by GitHub
parent 0c9f129c74
commit 4f936aada5
3 changed files with 18 additions and 9 deletions

View File

@@ -82,8 +82,8 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
end
def destroy
@inbox.destroy!
head :ok
::DeleteObjectJob.perform_later(@inbox) if @inbox.present?
render status: :ok, json: { message: I18n.t('messages.inbox_deletetion_response') }
end
private