#coding=utf-8

module Mobile
  module Apis
    class Messages< Grape::API
      resources :messages do

        desc "get special topic"
        get ':id' do
          user = UserWechat.find_by_openid(params[:openid]).user
          message = Message.find params[:id]
          present :data, message, with: Mobile::Entities::Message,user: user
          present :status, 0
        end
      end
    end
  end
end
