From 1fba4a3f06eb203eaee3dbea649e87a88d387d51 Mon Sep 17 00:00:00 2001 From: Bsian Date: Mon, 23 Dec 2019 18:14:42 +0000 Subject: [PATCH] Stop un initing --- src/class/Util.ts | 4 ++-- src/functions/checkSS.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index cdd27c2..6e24fae 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -238,9 +238,9 @@ export default class Util { return Promise.resolve(log); } - public getAcctHash(username: string) { + public getAcctHash(userpath: string) { try { - return fs.readFileSync(`${username}/.securesign/auth`).toString(); + return fs.readFileSync(`${userpath}/.securesign/auth`).toString(); } catch (error) { return null; } diff --git a/src/functions/checkSS.ts b/src/functions/checkSS.ts index 29e7b55..5a6070e 100644 --- a/src/functions/checkSS.ts +++ b/src/functions/checkSS.ts @@ -7,9 +7,9 @@ export default function checkSS(client: Client) { try { const accounts = await client.db.Account.find(); const hashes = accounts.filter((h) => h.hash); - for (const { userID, username } of hashes) { + for (const { userID, homepath } of hashes) { try { - const hash = client.util.getAcctHash(username); + const hash = client.util.getAcctHash(homepath); await axios({ method: 'get', url: 'https://api.securesign.org/account/details',