1
0
Fork 0

Change 1 for auth update

refactor/models
Bsian 2019-11-19 13:26:15 +00:00
parent 1e8512e9f5
commit d5fb18b73b
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 3 additions and 3 deletions

View File

@ -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]}'`);
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***`);
} catch (error) {
return this.client.util.handleError(error, message, this);

View File

@ -15,7 +15,7 @@ export interface AccountInterface extends Document {
engineer: boolean
},
root: boolean,
hash: string,
hash: boolean,
salt: string,
authTag: Buffer
}
@ -35,7 +35,7 @@ const Account: Schema = new Schema({
engineer: Boolean,
},
root: Boolean,
hash: String,
hash: Boolean,
salt: String,
authTag: Buffer,
});