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
+2 -2
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);