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

20 lines
422 B
Ruby

#coding=utf-8
module Mobile
module Apis
class Messages< Grape::API
resources :messages do
desc "get special topic"
get ':id' do
authenticate!
user = current_user
message = Message.find params[:id]
present :data, message, with: Mobile::Entities::Message,user: user
present :status, 0
end
end
end
end
end