fix(core): update

This commit is contained in:
2019-07-19 12:39:39 +02:00
parent d3a68b4fef
commit 82701c19e7
3 changed files with 7 additions and 6 deletions

View File

@@ -6,10 +6,10 @@ export interface IWorkerRoute extends interfaces.ICflareWorkerRoute {
zoneName: string;
}
export class Worker {
export class CloudflareWorker {
// STATIC
public static async fromApiObject(workerManager: WorkerManager, apiObject): Promise<Worker> {
const newWorker = new Worker(workerManager);
public static async fromApiObject(workerManager: WorkerManager, apiObject): Promise<CloudflareWorker> {
const newWorker = new CloudflareWorker(workerManager);
Object.assign(newWorker, apiObject.result);
await newWorker.getRoutes();
return newWorker;