From 40872f00e35bbe080870bfe497a26f9c8ad80028 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 30 Oct 2019 20:49:15 -0400 Subject: [PATCH] return the interface in util cacc --- src/class/Util.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 185aaaa..a46d23f 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -8,7 +8,7 @@ import uuid from 'uuid/v4'; import moment from 'moment'; import { Client } from '..'; import { Command, RichEmbed } from '.'; -import { ModerationInterface } from '../models'; +import { ModerationInterface, AccountInterface } from '../models'; export default class Util { public client: Client; @@ -121,14 +121,14 @@ export default class Util { return tempPass; } - public async createAccount(hash: string, etcPasswd: string, username: string, userID: string, emailAddress: string, moderatorID: string): Promise { + public async createAccount(hash: string, etcPasswd: string, username: string, userID: string, emailAddress: string, moderatorID: string): Promise { await this.exec(`useradd -m -p ${hash} -c ${etcPasswd} -s /bin/bash ${username}`); await this.exec(`chage -d0 ${username}`); const account = await new this.client.db.Account({ username, userID, emailAddress, createdBy: moderatorID, createdAt: new Date(), locked: false, }); - await account.save(); + return account.save(); } public async deleteAccount(username: string): Promise {