From 41e7f3fef52f37d17edfa8107a8fc8bf694b1bd0 Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Fri, 27 Oct 2023 12:50:43 +0200 Subject: [PATCH] use profile image url and not object in search results --- app/controllers/v0/application_controller.rb | 1 + app/controllers/v0/static_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/v0/application_controller.rb b/app/controllers/v0/application_controller.rb index 4daae564..cc15a895 100644 --- a/app/controllers/v0/application_controller.rb +++ b/app/controllers/v0/application_controller.rb @@ -12,6 +12,7 @@ class ApplicationController < ActionController::API include ErrorHandlers helper ::UserHelper + include ::UserHelper respond_to :json diff --git a/app/controllers/v0/static_controller.rb b/app/controllers/v0/static_controller.rb index 544b42c9..23b2b7e8 100644 --- a/app/controllers/v0/static_controller.rb +++ b/app/controllers/v0/static_controller.rb @@ -118,7 +118,7 @@ def search elsif s.searchable_type == 'User' h['username'] = s.searchable.username h['avatar'] = s.searchable.avatar - h['profile_picture'] = s.searchable.profile_picture + h['profile_picture'] = profile_picture_url(s.searchable) h['city'] = s.searchable.city h['url'] = v0_user_url(s.searchable_id) end