mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: attachment links in topic map were giving 404
This commit is contained in:
parent
23eadc3fb1
commit
5813cfd95b
2 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@ class TopicLinkSerializer < ApplicationSerializer
|
|||
:title,
|
||||
:fancy_title,
|
||||
:internal,
|
||||
:attachment,
|
||||
:reflection,
|
||||
:clicks,
|
||||
:user_id,
|
||||
|
@ -25,6 +26,10 @@ class TopicLinkSerializer < ApplicationSerializer
|
|||
object['internal'] == 't'
|
||||
end
|
||||
|
||||
def attachment
|
||||
Discourse.store.has_been_uploaded?(object['url'])
|
||||
end
|
||||
|
||||
def reflection
|
||||
object['reflection'] == 't'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue