fix(core): update
This commit is contained in:
@ -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!`);
|
||||
}
|
||||
},
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as plugins from './cloudflare.plugins';
|
||||
|
||||
export class CloudflareRecord {
|
||||
|
||||
}
|
||||
export class CloudflareRecord {}
|
||||
|
@ -47,5 +47,4 @@ export class CloudflareZone implements interfaces.ICflareZone {
|
||||
paused: boolean;
|
||||
type: string;
|
||||
checked_on: string;
|
||||
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -1,3 +1,3 @@
|
||||
import * as plugins from './cloudflare.plugins';
|
||||
|
||||
export const logger = new plugins.smartlog.ConsoleLog();
|
||||
export const logger = new plugins.smartlog.ConsoleLog();
|
||||
|
Reference in New Issue
Block a user