fix users/current api if not logged in

This commit is contained in:
Devin Howard 2017-03-08 21:39:35 -08:00
parent 725c02bf22
commit ba2679a965

View file

@ -3,6 +3,7 @@ module Api
module V2
class UsersController < RestfulController
def current
raise Pundit::NotAuthorizedError if current_user.nil?
@user = current_user
authorize @user
show # delegate to the normal show function