diff --git a/src/commands/securesign_init.ts b/src/commands/securesign_init.ts index e9d8417..1ccccfa 100644 --- a/src/commands/securesign_init.ts +++ b/src/commands/securesign_init.ts @@ -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); diff --git a/src/models/Account.ts b/src/models/Account.ts index 0f99acb..cadec7a 100644 --- a/src/models/Account.ts +++ b/src/models/Account.ts @@ -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, });