Change 1 for auth update
parent
1e8512e9f5
commit
d5fb18b73b
|
@ -47,7 +47,7 @@ export default class SecureSign_Init extends Command {
|
||||||
}
|
}
|
||||||
const init = await this.client.util.exec(`sudo -H -u ${account.username} bash -c 'securesign-canary init -a ${args[0]}'`);
|
const init = await this.client.util.exec(`sudo -H -u ${account.username} bash -c 'securesign-canary init -a ${args[0]}'`);
|
||||||
if (!init.replace(/^\s+|\s+$/g, '').endsWith('Initialization sequence completed.')) throw new Error(`Account initialization did not complete successfully:\n${init}`);
|
if (!init.replace(/^\s+|\s+$/g, '').endsWith('Initialization sequence completed.')) throw new Error(`Account initialization did not complete successfully:\n${init}`);
|
||||||
await this.client.db.Account.updateOne({ userID: message.author.id }, { $set: { hash: args[0] } });
|
await this.client.db.Account.updateOne({ userID: message.author.id }, { $set: { hash: true } });
|
||||||
return msg.edit(`${this.client.stores.emojis.success} ***Account initialized***`);
|
return msg.edit(`${this.client.stores.emojis.success} ***Account initialized***`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return this.client.util.handleError(error, message, this);
|
return this.client.util.handleError(error, message, this);
|
||||||
|
|
|
@ -15,7 +15,7 @@ export interface AccountInterface extends Document {
|
||||||
engineer: boolean
|
engineer: boolean
|
||||||
},
|
},
|
||||||
root: boolean,
|
root: boolean,
|
||||||
hash: string,
|
hash: boolean,
|
||||||
salt: string,
|
salt: string,
|
||||||
authTag: Buffer
|
authTag: Buffer
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ const Account: Schema = new Schema({
|
||||||
engineer: Boolean,
|
engineer: Boolean,
|
||||||
},
|
},
|
||||||
root: Boolean,
|
root: Boolean,
|
||||||
hash: String,
|
hash: Boolean,
|
||||||
salt: String,
|
salt: String,
|
||||||
authTag: Buffer,
|
authTag: Buffer,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue