prevent nil token
This commit is contained in:
@@ -20,7 +20,7 @@ class Api::UsersController < Api::ApiController
|
||||
end
|
||||
|
||||
def verify_custom_token
|
||||
if token != ENV['CUSTOM_API_TOKEN']
|
||||
if token.nil? || token.empty? || token != ENV['CUSTOM_API_TOKEN']
|
||||
unauthorized_entity(:user)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user