修复服务端ts类型检查

This commit is contained in:
hanhh
2021-09-24 22:49:14 +08:00
parent ff412c7497
commit 0141cd81c4
4 changed files with 6 additions and 11 deletions
-4
View File
@@ -80,11 +80,7 @@ export default ({ app }: { app: Application }) => {
const data = fs.readFileSync(config.authConfigFile, 'utf8');
if (data) {
const { token = '', tokens = {} } = JSON.parse(data);
console.log(tokens);
console.log(req.platform);
console.log(tokens[req.platform]);
if (headerToken === token || tokens[req.platform] === headerToken) {
console.log('yes');
return next();
}
}