From 80c8328e8701923e4a3c28e79ddf168a539d12e4 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 30 Oct 2019 11:53:18 -0400 Subject: [PATCH] Update src/commands/cwg.ts --- src/commands/cwg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 1f423a1..bfc5e89 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -125,8 +125,8 @@ export default class CWG extends Command { headers: { Authorization: `Bearer ${this.client.config.cloudflare}` }, }); this.client.signale.debug(resultID.data); - const recordID = resultID.data.result[0].id; if (resultID.data.result[0]) { + const recordID = resultID.data.result[0].id; await axios({ method: 'delete', url: `https://api.cloudflare.com/client/v4/zones/5e82fc3111ed4fbf9f58caa34f7553a7/dns_records/${recordID}`,