Skip to content

Commit 9c02abe

Browse files
committed
fix same issue for api V0 token
1 parent e6fc2bb commit 9c02abe

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/controllers/api/v0/base_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ def authenticate_token
119119
else
120120
@token = token
121121
@user = User.find_by(api_token: token)
122-
# if no user found, return false, otherwise true
123-
!@user.nil? && @user.can_use_api?
122+
@user.present? && @user.active? && @user.can_use_api?
124123
end
125124
end
126125
end

0 commit comments

Comments
 (0)