@@ -27,7 +27,7 @@ module.exports.getAccessToken = function(bearerToken) {
2727 * Get client.
2828 */
2929
30- module . exports . getClient = function * ( clientId , clientSecret ) {
30+ module . exports . getClient = function ( clientId , clientSecret ) {
3131 return pg . query ( 'SELECT client_id, client_secret, redirect_uri FROM oauth_clients WHERE client_id = $1 AND client_secret = $2' , [ clientId , clientSecret ] )
3232 . then ( function ( result ) {
3333 var oAuthClient = result . rows [ 0 ] ;
@@ -48,7 +48,7 @@ module.exports.getClient = function *(clientId, clientSecret) {
4848 * Get refresh token.
4949 */
5050
51- module . exports . getRefreshToken = function * ( bearerToken ) {
51+ module . exports . getRefreshToken = function ( bearerToken ) {
5252 return pg . query ( 'SELECT access_token, access_token_expires_on, client_id, refresh_token, refresh_token_expires_on, user_id FROM oauth_tokens WHERE refresh_token = $1' , [ bearerToken ] )
5353 . then ( function ( result ) {
5454 return result . rowCount ? result . rows [ 0 ] : false ;
@@ -59,7 +59,7 @@ module.exports.getRefreshToken = function *(bearerToken) {
5959 * Get user.
6060 */
6161
62- module . exports . getUser = function * ( username , password ) {
62+ module . exports . getUser = function ( username , password ) {
6363 return pg . query ( 'SELECT id FROM users WHERE username = $1 AND password = $2' , [ username , password ] )
6464 . then ( function ( result ) {
6565 return result . rowCount ? result . rows [ 0 ] : false ;
@@ -70,7 +70,7 @@ module.exports.getUser = function *(username, password) {
7070 * Save token.
7171 */
7272
73- module . exports . saveAccessToken = function * ( token , client , user ) {
73+ module . exports . saveAccessToken = function ( token , client , user ) {
7474 return pg . query ( 'INSERT INTO oauth_tokens(access_token, access_token_expires_on, client_id, refresh_token, refresh_token_expires_on, user_id) VALUES ($1, $2, $3, $4)' , [
7575 token . accessToken ,
7676 token . accessTokenExpiresOn ,
0 commit comments