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