Commit fddf19f

HPCesia <me@hpcesia.com>
2025-03-18 13:33:24
fix: Waline api url
1 parent 3f443e4
Changed files (1)
src
components
aside
recent-comments
src/components/aside/recent-comments/Waline.astro
@@ -1,15 +1,12 @@
 <script>
   import { asideConfig, commentConfig } from '@/config';
-  import { joinUrl } from '@utils/url-utils';
   import { cleanCommentHtml, createCommentItem, getTemplate } from './utils.ts';
 
   async function setup() {
     const walineConfig = commentConfig.waline!;
     const commentCount = asideConfig.recentComment.count;
-    const apiUrl = joinUrl(
-      walineConfig.serverURL,
-      `api/comment?type=recent&count=${commentCount}`
-    );
+    const apiUrl = `${walineConfig.serverURL}/api/comment?type=recent&count=${commentCount}`;
+    console.log('apiUrl', apiUrl);
 
     const response = await fetch(apiUrl, {
       method: 'GET',