fix(aside): Waline recent comments api

This commit is contained in:
HPCesia 2025-04-05 18:55:12 +08:00
parent e53aef90b9
commit 28542e1a45
Signed by: HPCesia
GPG Key ID: 2C107E1FD23C98DF

View File

@ -10,10 +10,7 @@
async function setup() {
const walineConfig = commentConfig.waline!;
const commentCount = asideConfig.recentComment.count;
const apiUrl = new URL(
`api/comment?type=recent&count=${commentCount}`,
walineConfig.serverURL
).toString();
const apiUrl = `${walineConfig.serverURL}/api/comment?type=recent&count=${commentCount}`;
const response = await fetch(apiUrl, {
method: 'GET',