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

27 lines
664 B
Ruby

#coding=utf-8
module Mobile
module Apis
class Issues< Grape::API
resources :issues do
include IssuesHelper
desc "get special issuse"
post ':id' do
authenticate!
user = current_user
#0一级回复的更多 1 二级回复的更多
type = params[:type] || 0
page = params[:page] || 0
issue = Issue.find params[:id]
present :data, issue, with: Mobile::Entities::Issue,user: user,type: type,page: page
present :type, type
present :page, page
present :status, 0
end
end
end
end
end