MCPcopy Index your code
hub / github.com/MatterAIOrg/OrbCode / getUrlFromToken

Function getUrlFromToken

src/auth/auth.ts:27–32  ·  view source on GitHub ↗
(targetUrl: string, token?: string)

Source from the content-addressed store, hash-verified

25
26/** Re-host targetUrl onto the backend resolved from the token. */
27export function getUrlFromToken(targetUrl: string, token?: string): string {
28 const target = new URL(targetUrl);
29 const { protocol, host } = new URL(getBaseUrlFromToken(token));
30 Object.assign(target, { protocol, host });
31 return target.toString();
32}
33
34export const APP_URL = "https://app.matterai.so";
35

Callers 5

webSearchFunction · 0.85
webFetchFunction · 0.85
fetchProfileFunction · 0.85
fetchTaskTitleFunction · 0.85
fetchBalanceFunction · 0.85

Calls 1

getBaseUrlFromTokenFunction · 0.85

Tested by

no test coverage detected