mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-12-11 09:28:24 +00:00
use shared URL verification in verifyLinkFields
This commit is contained in:
parent
982223ad38
commit
3849e8c15a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue