Skip to content
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
sreya committed Nov 27, 2024
commit ec8bea288cd6b659d2e73b2970ed754858f6db31
10 changes: 5 additions & 5 deletions site/src/utils/apps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type * as TypesGen from "api/typesGenerated";
import URLParse from 'url-parse';
import URLParse from "url-parse";

export const createAppLinkHref = (
protocol: string,
Expand Down Expand Up @@ -30,10 +30,10 @@ export const createAppLinkHref = (
}

if (appsHost && app.subdomain && app.subdomain_name) {
const url = new URLParse('');
url.set('protocol', protocol);
url.set('hostname', appsHost.replace('*', app.subdomain_name));
url.set('pathname', '/');
const url = new URLParse("");
url.set("protocol", protocol);
url.set("hostname", appsHost.replace("*", app.subdomain_name));
url.set("pathname", "/");

href = url.toString();
}
Expand Down
10 changes: 5 additions & 5 deletions site/src/utils/portForward.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WorkspaceAgentPortShareProtocol } from "api/typesGenerated";
import URLParse from 'url-parse';
import URLParse from "url-parse";

export const portForwardURL = (
host: string,
Expand All @@ -13,10 +13,10 @@ export const portForwardURL = (
const suffix = protocol === "https" ? "s" : "";

const subdomain = `${port}${suffix}--${agentName}--${workspaceName}--${username}`;
const url = new URLParse('');
url.set('protocol', location.protocol);
url.set('hostname', host.replace('*', subdomain));
const url = new URLParse("");
url.set("protocol", location.protocol);
url.set("hostname", host.replace("*", subdomain));

return url.toString();
};

Expand Down
Loading