Update user.js
if no token provided for logout, then we set tokenID to empty string to throw a normal error "Error: access_token is a required argument" instead of "Error: Value is not a string"
This commit is contained in:
parent
035f4d095b
commit
dd7f18b7ac
|
@ -758,7 +758,7 @@ module.exports = function(User) {
|
|||
var accessToken = req && req.accessToken;
|
||||
var tokenID = accessToken && accessToken.id;
|
||||
|
||||
return tokenID;
|
||||
return tokenID || '';
|
||||
}, description: 'Do not supply this argument, it is automatically extracted ' +
|
||||
'from request headers.',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue