fix users/current api if not logged in
This commit is contained in:
parent
725c02bf22
commit
ba2679a965
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue