2016-03-30 17:47:44 +08:00
|
|
|
#coding=utf-8
|
|
|
|
|
|
|
|
module Mobile
|
|
|
|
module Apis
|
|
|
|
class Messages< Grape::API
|
|
|
|
resources :messages do
|
|
|
|
|
|
|
|
desc "get special topic"
|
|
|
|
get ':id' do
|
2016-06-20 14:39:20 +08:00
|
|
|
authenticate!
|
|
|
|
user = current_user
|
2016-03-30 17:47:44 +08:00
|
|
|
message = Message.find params[:id]
|
2016-04-07 11:16:38 +08:00
|
|
|
present :data, message, with: Mobile::Entities::Message,user: user
|
2016-03-30 17:47:44 +08:00
|
|
|
present :status, 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|