chore: Endpoint to purge portal logo (#8365)

This commit is contained in:
Sojan Jose
2023-11-17 11:43:22 -08:00
committed by GitHub
parent 04dd65687b
commit 0e19a4196b
4 changed files with 43 additions and 0 deletions

View File

@@ -47,6 +47,11 @@ class Api::V1::Accounts::PortalsController < Api::V1::Accounts::BaseController
head :ok
end
def logo
@portal.logo.purge if @portal.logo.attached?
head :ok
end
def process_attached_logo
blob_id = params[:blob_id]
blob = ActiveStorage::Blob.find_by(id: blob_id)