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:
Raeef Refai 2017-01-24 02:32:42 +02:00 committed by GitHub
parent 035f4d095b
commit dd7f18b7ac
1 changed files with 1 additions and 1 deletions

View File

@ -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.',
},