MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / normalizeSub2ApiUrl

Function normalizeSub2ApiUrl

background/navigation-utils.js:20–29  ·  view source on GitHub ↗
(rawUrl)

Source from the content-addressed store, hash-verified

18 }
19
20 function normalizeSub2ApiUrl(rawUrl) {
21 const input = (rawUrl || '').trim() || DEFAULT_SUB2API_URL;
22 const withProtocol = /^https?:\/\//i.test(input) ? input : `https://${input}`;
23 const parsed = new URL(withProtocol);
24 if (!parsed.pathname || parsed.pathname === '/') {
25 parsed.pathname = '/admin/accounts';
26 }
27 parsed.hash = '';
28 return parsed.toString();
29 }
30
31 function getPanelMode(state = {}) {
32 return state.panelMode === 'sub2api' ? 'sub2api' : 'cpa';

Callers 2

requestSub2ApiOAuthUrlFunction · 0.70
executeSub2ApiStep9Function · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected