1
0
Fork 0

fix issue on CI

refactor/models
Matthew 2020-03-28 11:32:51 -04:00
parent da61fade27
commit b615178da6
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export default class CWG_Delete extends Command {
public async run(message: Message, args: string[]) {
try {
if (!args[0]) return this.client.commands.get('help').run(message, ['cwg', this.name]);
const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || '' }] });
const domain = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || 0 }] });
if (!domain) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`);
const edit = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Deleting domain...***`);
const embed = new RichEmbed();

View File

@ -18,7 +18,7 @@ export default class CWG_UpdateCert extends Command {
public async run(message: Message, args: string[]) {
try {
if (!args[2]) return this.client.commands.get('help').run(message, ['cwg', this.name]);
const dom = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || '' }] });
const dom = await this.client.db.Domain.findOne({ $or: [{ domain: args[0] }, { port: Number(args[0]) || 0 }] });
if (!dom) return message.channel.createMessage(`***${this.client.stores.emojis.error} The domain or port you provided could not be found.***`);
const { domain, port, x509, account } = dom;
const { cert, key } = x509;