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

20 lines
426 B
Ruby

#coding=utf-8
module Mobile
module Apis
class BlogComments< Grape::API
resources :blog_comments do
desc "get special topic"
get ':id' do
user = UserWechat.find_by_openid(params[:openid]).user
blog = BlogComment.find params[:id]
present :data, blog, with: Mobile::Entities::BlogComment,user: user
present :status, 0
end
end
end
end
end