Commit 28542e1

HPCesia <me@hpcesia.com>
2025-04-05 10:55:12
fix(aside): Waline recent comments api
1 parent e53aef9
Changed files (1)
src
components
aside
recent-comments
src/components/aside/recent-comments/Waline.astro
@@ -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',