MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / deleteAdvScan

Function deleteAdvScan

web/scripts/ragnar_modern.js:19301–19320  ·  view source on GitHub ↗
(scanId)

Source from the content-addressed store, hash-verified

19299 const { network } = getSelectedDashboardNetworkKey() || {};
19300 if (!network) {
19301 return endpoint;
19302 }
19303
19304 const likelyApiPath = trimmed.startsWith('/api/') || trimmed.startsWith('api/');
19305
19306 try {
19307 const url = new URL(trimmed, window.location.origin);
19308 const sameOriginApi = url.origin === window.location.origin && url.pathname.startsWith('/api/');
19309
19310 if (!sameOriginApi) {
19311 return endpoint;
19312 }
19313
19314 if (!url.searchParams.has(NETWORK_CONTEXT_PARAM)) {
19315 url.searchParams.set(NETWORK_CONTEXT_PARAM, network);
19316 }
19317
19318 if (trimmed.startsWith('http://') || trimmed.startsWith('https://')) {
19319 return url.toString();
19320 }
19321
19322 return `${url.pathname}${url.search}${url.hash}`;
19323 } catch (error) {

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
showNotificationFunction · 0.70
refreshAdvVulnDataFunction · 0.70

Tested by

no test coverage detected