metamaps--metamaps/app/controllers/api/v1/tokens_controller.rb
2016-09-13 15:21:14 +08:00

17 lines
374 B
Ruby

module Api
module V1
class TokensController < RestfulController
def my_tokens
raise Pundit::NotAuthorizedError unless current_user
instantiate_collection page_collection: false, timeframe_collection: false
respond_with_collection
end
private
def visible_records
current_user.tokens
end
end
end
end