Force content type to "text/html"

- Force the content type to be `text/html` (instead of `application/json`)
This commit is contained in:
Jean-Baptiste Bellet
2021-05-12 11:41:50 +02:00
parent ecb4cb31ad
commit 6842cbfda4

View File

@@ -44,9 +44,9 @@ module Api
authorize! :update, @enterprise
if params[:logo] && @enterprise.update( logo: params[:logo] )
render plain: @enterprise.logo.url(:medium), status: :ok
render html: @enterprise.logo.url(:medium), status: :ok
elsif params[:promo] && @enterprise.update( promo_image: params[:promo] )
render plain: @enterprise.promo_image.url(:medium), status: :ok
render html: @enterprise.promo_image.url(:medium), status: :ok
else
invalid_resource!(@enterprise)
end