pass_server.rb
# Validate that the request has valid api_token
Validate that the request has valid api_token
Validate that the request has valid api_token
def is_api_token_valid?(user_id, user_token)
    user = self.users.where(:id => user_id, :api_token => user_token).first
    if user
      return true
    else
      halt 401, 'api_token is incorrect'
    end
  end
def is_api_token_valid? ( user_id , user_token ) user = self . users . where ( :id => user_id , :api_token => user_token ) . first if user return true else halt 401 , 'api_token is incorrect' end end
Validate that the request has valid api_token
Validate that the request has valid api_token
user_id
<not_specific>
user_token
<not_specific>