1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00

use shared URL verification in verifyLinkFields

This commit is contained in:
Hazelnoot
2025-07-04 14:53:02 -04:00
committed by dakkar
parent 982223ad38
commit 3849e8c15a

View File

@@ -10,7 +10,7 @@ type Field = { name: string, value: string };
export async function verifyFieldLinks(fields: Field[], profile_url: string, httpRequestService: HttpRequestService): Promise<string[]> {
const verified_links = [];
for (const field_url of fields.filter(x => URL.canParse(x.value) && ['http:', 'https:'].includes((new URL(x.value).protocol)))) {
for (const field_url of fields) {
try {
const html = await httpRequestService.getHtml(field_url.value);