forked from Gitlink/forgeplus
change my_interested bugs
This commit is contained in:
parent
598571e8f4
commit
921655567a
|
@ -264,7 +264,7 @@ module ApiIndexHelper
|
|||
def get_all_sections(sections)
|
||||
section_item = []
|
||||
sections.each do |tag|
|
||||
children_tags = tag.children.as_json(only: [:id, :title]).map{|k| k["forum_section"]}
|
||||
children_tags = tag.children.as_json(only: [:id, :title])
|
||||
section_item.push({
|
||||
id: tag.id,
|
||||
title: tag.title,
|
||||
|
|
|
@ -162,7 +162,7 @@ class MemosService
|
|||
current_login: current_user.try(:login),
|
||||
is_current_user: memo.author_id == current_user.try(:id)
|
||||
}
|
||||
recent_memos = memo_author_memos.posts.where("id != ?", params[:id].to_i).order_index("published_at").select([:id,:subject]).limit(3).as_json.map{|k| k["memo"]}
|
||||
recent_memos = memo_author_memos.posts.where("id != ?", params[:id].to_i).order_index("published_at").select([:id,:subject]).limit(3).as_json
|
||||
|
||||
memo_info = {id: memo.id,
|
||||
subject: memo.subject,
|
||||
|
|
|
@ -51,7 +51,7 @@ class MyMemosService
|
|||
end
|
||||
forum_sections_count = forum_sections.size # 帖子的总数
|
||||
forum_sections = forum_sections.limit(index_limit).offset(offset)
|
||||
all_forum_sections = forum_sections.as_json.map{|k,v| k["forum_section"]}
|
||||
all_forum_sections = forum_sections.as_json
|
||||
{
|
||||
count: forum_sections_count,
|
||||
forum_details: all_forum_sections,
|
||||
|
|
Loading…
Reference in New Issue