revert islogged function check token validation and clean expired tokens

This commit is contained in:
Levi Yan
2025-03-23 22:16:49 +08:00
parent c47739a718
commit 000749f7d9

View File

@@ -32,12 +32,12 @@ export default class User {
this.devstarHostname = parsedUrl.hostname.replace(/\./g, '_'); //提取hostname并用下划线替换.
}
public async login(token: string, username: string): Promise<string> {
public async login(token: string, username: string) {
const devstarAPIHandler = new DevstarAPIHandler()
try {
const res = await devstarAPIHandler.verifyToken(token, username)
if (res !== 'ok') {
if (!res) {
throw new Error('Token verification failed')
}