Move cookie logic into cookie component

This commit is contained in:
Alicia Sykes 2023-08-13 13:59:23 +01:00
parent 9430fc7913
commit cb0143de40

View File

@ -57,8 +57,7 @@ import { determineAddressType, AddressType } from 'utils/address-type-checker';
import useMotherHook from 'hooks/motherOfAllHooks';
import {
getLocation, ServerLocation,
parseCookies, Cookie,
parseRobotsTxt,
Cookie,
applyWhoIsResults, Whois,
parseShodanResults, ShodanResults
} from 'utils/result-processor';
@ -187,8 +186,7 @@ const Results = (): JSX.Element => {
updateLoadingJobs,
addressInfo: { address, addressType, expectedAddressTypes: urlTypeOnly },
fetchRequest: () => fetch(`${api}/cookies?url=${address}`)
.then(res => parseJson(res))
.then(res => parseCookies(res.cookies)),
.then(res => parseJson(res)),
});
// Fetch and parse crawl rules from robots.txt