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',