🐛 bug fix

This commit is contained in:
Song
2021-06-13 12:11:26 +08:00
parent 5124074b63
commit 9f04d2d7a9
6 changed files with 22 additions and 4 deletions
+10
View File
@@ -75,9 +75,19 @@ function getUserDefaultMethod(prefix) {
return user.defaultMethod;
}
function checkAccessToken(prefix, token) {
let user = tokenStore.get(prefix);
if (user.accessToken === '') {
return true;
} else {
return user.accessToken === token;
}
}
module.exports = {
initializeTokenStore,
updateTokenStore,
getUserDefaultMethod,
tokenStore,
checkAccessToken,
};