MCPcopy Create free account
hub / github.com/Exafunction/codeium-chrome / getGeneralPortalUrl

Function getGeneralPortalUrl

src/storage.ts:106–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106export async function getGeneralPortalUrl(): Promise<string | undefined> {
107 const portalUrl = await getStorageItem('portalUrl');
108 if (portalUrl === undefined || portalUrl === '') {
109 return undefined;
110 }
111 try {
112 new URL(portalUrl);
113 } catch (error) {
114 console.log('Invalid portal URL:', portalUrl);
115 return undefined;
116 }
117 return portalUrl;
118}
119
120// Note that this gets you the profile URL given the current portal URL, not the
121// specific profile URL of the logged in account.

Callers 3

serviceWorker.tsFile · 0.90
loginFunction · 0.90
getGeneralProfileUrlFunction · 0.85

Calls 1

getStorageItemFunction · 0.85

Tested by

no test coverage detected