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

32 lines
759 B
Ruby
Raw Normal View History

2016-03-30 15:51:27 +08:00
#coding=utf-8
module Mobile
module Apis
class BlogComments< Grape::API
resources :blog_comments do
desc "get special topic"
2016-07-20 13:34:58 +08:00
post ':id' do
begin
user = current_user
2016-07-20 10:09:27 +08:00
#0一级回复的更多 1 二级回复的更多
type = params[:type] || 0
page = params[:page] || 0
2016-07-20 10:09:27 +08:00
blog = BlogComment.find params[:id]
present :data, blog, with: Mobile::Entities::BlogComment,user: user,type: type,page: page
present :type, type
present :page, page
present :status, 0
rescue Exception=>e
present :status, -1
present :message, e.message
end
2016-03-30 15:51:27 +08:00
end
end
end
end
end
2016-03-30 18:00:39 +08:00