mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Update URL templates to use opts objects
This commit is contained in:
23 files changed
+67
-50
No files matched your search
@@ -89,7 +89,7 @@ export class NetlifyAdapter implements DeployAdapter {
|
||||
|
||||
private async createSite(name: string): Promise<NetlifySite> {
|
||||
const url = `${this.baseURL}/sites`;
|
||||
const targetUrl = this.corsProxy ? proxyUrl(this.corsProxy, url) : url;
|
||||
const targetUrl = this.corsProxy ? proxyUrl({ template: this.corsProxy, url }) : url;
|
||||
|
||||
const response = await fetch(targetUrl, {
|
||||
method: 'POST',
|
||||
@@ -113,7 +113,7 @@ export class NetlifyAdapter implements DeployAdapter {
|
||||
|
||||
private async getSite(siteId: string): Promise<NetlifySite> {
|
||||
const url = `${this.baseURL}/sites/${siteId}`;
|
||||
const targetUrl = this.corsProxy ? proxyUrl(this.corsProxy, url) : url;
|
||||
const targetUrl = this.corsProxy ? proxyUrl({ template: this.corsProxy, url }) : url;
|
||||
|
||||
const response = await fetch(targetUrl, {
|
||||
method: 'GET',
|
||||
@@ -132,7 +132,7 @@ export class NetlifyAdapter implements DeployAdapter {
|
||||
|
||||
private async triggerDeploy(siteId: string, zipBlob: Blob): Promise<NetlifyBuildResponse> {
|
||||
const url = `${this.baseURL}/sites/${siteId}/deploys`;
|
||||
const targetUrl = this.corsProxy ? proxyUrl(this.corsProxy, url) : url;
|
||||
const targetUrl = this.corsProxy ? proxyUrl({ template: this.corsProxy, url }) : url;
|
||||
|
||||
const response = await fetch(targetUrl, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in new issue
Block a user