Fix logout

This commit is contained in:
Louis Lam
2023-12-09 17:17:24 +08:00
parent 16a5f2a175
commit fd7f539089
3 changed files with 16 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ export const main = async () => {
// Reset all sessions by reset jwt secret
await server.initJWTSecret();
console.log("Password reset successfully.");
// Disconnect all other socket clients of the user
await disconnectAllSocketClients(user.username, password);
@@ -56,7 +58,6 @@ export const main = async () => {
console.log("Passwords do not match, please try again.");
}
}
console.log("Password reset successfully.");
}
} catch (e) {
if (e instanceof Error) {