mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: serve category images from the CDN
This commit is contained in:
@@ -40,4 +40,14 @@ class BasicCategorySerializer < ApplicationSerializer
|
||||
def notification_level
|
||||
object.notification_level
|
||||
end
|
||||
|
||||
def logo_url
|
||||
url = object.logo_url
|
||||
url.present? && UrlHelper.is_local(url) ? UrlHelper.schemaless(UrlHelper.absolute(url)) : url
|
||||
end
|
||||
|
||||
def background_url
|
||||
url = object.background_url
|
||||
url.present? && UrlHelper.is_local(url) ? UrlHelper.schemaless(UrlHelper.absolute(url)) : url
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user