fix(core): update

This commit is contained in:
2020-06-10 05:34:47 +00:00
parent 90c9bfc906
commit fe2f45e3a9
9 changed files with 27 additions and 26 deletions

View File

@ -47,10 +47,7 @@ export class CloudflareAccount {
if (filteredResponse.length >= 1) {
return filteredResponse[0].id;
} else {
logger.log(
'error',
`the domain ${domainName} does not appear to be in this account!`
);
logger.log('error', `the domain ${domainName} does not appear to be in this account!`);
throw new Error(`the domain ${domainName} does not appear to be in this account!`);
}
},

View File

@ -1,5 +1,3 @@
import * as plugins from './cloudflare.plugins';
export class CloudflareRecord {
}
export class CloudflareRecord {}

View File

@ -47,5 +47,4 @@ export class CloudflareZone implements interfaces.ICflareZone {
paused: boolean;
type: string;
checked_on: string;
}

View File

@ -14,14 +14,14 @@ export class ZoneManager {
public async getZones(zoneName: string) {
let requestRoute = `/zones?per_page=50`;
// may be optionally filtered by domain name
if (zoneName) {
requestRoute = `${requestRoute}&name=${zoneName}`;
}
const response: any = await this.cfAccount.request('GET', requestRoute);
const apiObjects: interfaces.ICflareZone[] = response.result;
const cloudflareZoneArray = [];
for (const apiObject of apiObjects) {
cloudflareZoneArray.push(CloudflareZone.createFromApiObject(apiObject));

View File

@ -1,3 +1,3 @@
import * as plugins from './cloudflare.plugins';
export const logger = new plugins.smartlog.ConsoleLog();
export const logger = new plugins.smartlog.ConsoleLog();