You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
558 B
16 lines
558 B
5 years ago
|
json.count @count
|
||
|
json.libraries do
|
||
|
json.array! @libraries.each do |library|
|
||
|
json.extract! library, :id, :title, :content, :author_name, :author_school_name, :status, :visited_count
|
||
|
|
||
|
json.cover_url library.cover_id.present? ? download_url(library.cover) : nil
|
||
|
|
||
|
json.praise_count library.praise_tread_cache&.praise_num || 0
|
||
|
json.download_count @download_count_map.fetch(library.id, 0)
|
||
|
|
||
|
json.published_at library.display_published_at
|
||
|
json.created_at library.display_created_at
|
||
|
|
||
|
json.tags library.library_tags.map(&:name)
|
||
|
end
|
||
|
end
|