fix(route): url formatting in 2048 (#15855)

This commit is contained in:
Tony 2024-06-08 21:21:49 +08:00 committed by GitHub
parent d8dc6fbee0
commit c7f183d8a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -76,11 +76,11 @@ async function handler(ctx) {
},
});
const $ = load(response);
const targetLink = $('table.group-table tr').eq(1).find('td a').eq(0).attr('href');
const targetLink = new URL($('table.group-table tr').eq(1).find('td a').eq(0).attr('href')).href;
return targetLink;
});
const currentUrl = `${entranceDomain}/2048/thread.php?fid-${id}.html`;
const currentUrl = `${entranceDomain}2048/thread.php?fid-${id}.html`;
const response = await ofetch.raw(currentUrl);