From 6842cbfda4a09d0adbdb63a9307d9c8ecfabe773 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 12 May 2021 11:41:50 +0200 Subject: [PATCH] Force content type to "text/html" - Force the content type to be `text/html` (instead of `application/json`) --- app/controllers/api/v0/enterprises_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v0/enterprises_controller.rb b/app/controllers/api/v0/enterprises_controller.rb index 804808f53b..9dd4737a5d 100644 --- a/app/controllers/api/v0/enterprises_controller.rb +++ b/app/controllers/api/v0/enterprises_controller.rb @@ -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