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

20 lines
403 B
Ruby

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