fix(core): update
This commit is contained in:
@@ -13,7 +13,7 @@ export class CloudflareWorker {
|
||||
apiObject
|
||||
): Promise<CloudflareWorker> {
|
||||
const newWorker = new CloudflareWorker(workerManager);
|
||||
Object.assign(newWorker, apiObject.result);
|
||||
Object.assign(newWorker, apiObject);
|
||||
await newWorker.getRoutes();
|
||||
return newWorker;
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ export class WorkerManager {
|
||||
'Content-Type': 'application/javascript',
|
||||
'Content-Length': Buffer.byteLength(workerScript)
|
||||
});
|
||||
return CloudflareWorker.fromApiObject(this, responseBody);
|
||||
return CloudflareWorker.fromApiObject(this, responseBody.result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user