Stop un initing
parent
bc4e351a0a
commit
1fba4a3f06
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue