Stop un initing

merge-requests/1/merge
Bsian 2019-12-23 18:14:42 +00:00
parent bc4e351a0a
commit 1fba4a3f06
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 4 additions and 4 deletions

View File

@ -238,9 +238,9 @@ export default class Util {
return Promise.resolve(log); return Promise.resolve(log);
} }
public getAcctHash(username: string) { public getAcctHash(userpath: string) {
try { try {
return fs.readFileSync(`${username}/.securesign/auth`).toString(); return fs.readFileSync(`${userpath}/.securesign/auth`).toString();
} catch (error) { } catch (error) {
return null; return null;
} }

View File

@ -7,9 +7,9 @@ export default function checkSS(client: Client) {
try { try {
const accounts = await client.db.Account.find(); const accounts = await client.db.Account.find();
const hashes = accounts.filter((h) => h.hash); const hashes = accounts.filter((h) => h.hash);
for (const { userID, username } of hashes) { for (const { userID, homepath } of hashes) {
try { try {
const hash = client.util.getAcctHash(username); const hash = client.util.getAcctHash(homepath);
await axios({ await axios({
method: 'get', method: 'get',
url: 'https://api.securesign.org/account/details', url: 'https://api.securesign.org/account/details',