feat: Ability to remove inbox avatar (#2885)
* Delete inbox avatar 1) New API endpoint added for deleting inbox avatar. 2) Delete avatar button in the inbox settings page. Co-authored-by: Sojan Jose <sojan@pepalo.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -15,6 +15,11 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
|
||||
@campaigns = @inbox.campaigns
|
||||
end
|
||||
|
||||
def avatar
|
||||
@inbox.avatar.attachment.destroy! if @inbox.avatar.attached?
|
||||
head :ok
|
||||
end
|
||||
|
||||
def create
|
||||
ActiveRecord::Base.transaction do
|
||||
channel = create_channel
|
||||
|
||||
Reference in New Issue
Block a user