socialforge/app/api/mobile/apis/journal_for_messages.rb

27 lines
674 B
Ruby
Raw Normal View History

2016-03-30 17:47:44 +08:00
#coding=utf-8
module Mobile
module Apis
class JournalForMessages< Grape::API
resources :journal_for_messages do
desc "get special journal"
2016-07-20 13:34:58 +08:00
post ':id' do
authenticate!
user = current_user
2016-07-20 13:34:58 +08:00
#0一级回复的更多 1 二级回复的更多
type = params[:type] || 0
page = params[:page] || 0
2016-03-30 17:47:44 +08:00
jour = JournalsForMessage.find params[:id]
2016-07-20 13:34:58 +08:00
present :data, jour, with: Mobile::Entities::Jours,user: user,type: type,page: page
present :type, type
present :page, page
2016-03-30 17:47:44 +08:00
present :status, 0
end
end
end
end
end