Browse Source

change my_interested bugs

pull/245/head
sylor_huang@126.com 5 years ago
parent
commit
921655567a
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/helpers/api_index_helper.rb
  2. +1
    -1
      app/services/memos_service.rb
  3. +1
    -1
      app/services/my_memos_service.rb

+ 1
- 1
app/helpers/api_index_helper.rb View File

@@ -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,


+ 1
- 1
app/services/memos_service.rb View File

@@ -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,


+ 1
- 1
app/services/my_memos_service.rb View File

@@ -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…
Cancel
Save