We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module.exports.getAccessToken = function(bearerToken) { return pg.query('SELECT access_token, access_token_expires_on, client_id, refresh_token, refresh_token_expires_on, user_id FROM oauth_tokens WHERE access_token = $1', [bearerToken]) .then(function(result) { var token = result.rows[0]; return { accessToken: token.access_token, clientId: token.client_id, expires: token.expires, // This position userId: token.userId //And this position }; }); };
Please fix it to:
module.exports.getAccessToken = function(bearerToken) { return pg.query('SELECT access_token, access_token_expires_on, client_id, refresh_token, refresh_token_expires_on, user_id FROM oauth_tokens WHERE access_token = $1', [bearerToken]) .then(function(result) { var token = result.rows[0]; return { accessToken: token.access_token, clientId: token.client_id, expires: token.access_token_expires_on, userId: token.user_id }; }); };
Or:
module.exports.getAccessToken = function(bearerToken) { return pg.query('SELECT access_token, access_token_expires_on AS expires, client_id, refresh_token, refresh_token_expires_on, user_id AS userId FROM oauth_tokens WHERE access_token = $1', [bearerToken]) .then(function(result) { var token = result.rows[0]; return { accessToken: token.access_token, clientId: token.client_id, expires: token.expires, userId: token.userId }; }); };
The text was updated successfully, but these errors were encountered:
Could you take this code and create a PR for it?
Sorry, something went wrong.
No branches or pull requests
Please fix it to:
Or:
The text was updated successfully, but these errors were encountered: