Update src/commands/cwg.ts

merge-requests/1/merge
Matthew 2019-10-30 11:53:18 -04:00
parent 0c9160a196
commit 80c8328e87
1 changed files with 1 additions and 1 deletions

View File

@ -125,8 +125,8 @@ export default class CWG extends Command {
headers: { Authorization: `Bearer ${this.client.config.cloudflare}` }, headers: { Authorization: `Bearer ${this.client.config.cloudflare}` },
}); });
this.client.signale.debug(resultID.data); this.client.signale.debug(resultID.data);
const recordID = resultID.data.result[0].id;
if (resultID.data.result[0]) { if (resultID.data.result[0]) {
const recordID = resultID.data.result[0].id;
await axios({ await axios({
method: 'delete', method: 'delete',
url: `https://api.cloudflare.com/client/v4/zones/5e82fc3111ed4fbf9f58caa34f7553a7/dns_records/${recordID}`, url: `https://api.cloudflare.com/client/v4/zones/5e82fc3111ed4fbf9f58caa34f7553a7/dns_records/${recordID}`,