From 07f4155c2c89a9b362c31e639efb96d243d701f8 Mon Sep 17 00:00:00 2001 From: libr Date: Fri, 28 Nov 2025 17:22:21 +0800 Subject: [PATCH] 1 --- src/lib/data-utils.ts | 2 +- src/lib/notion/client.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/data-utils.ts b/src/lib/data-utils.ts index 1576f2d..1bc9eed 100644 --- a/src/lib/data-utils.ts +++ b/src/lib/data-utils.ts @@ -239,7 +239,7 @@ export async function fetchRemotePost( slug: string, ): Promise { try { - const res = await fetch(`${POSTS_API_URL}/${slug}`) + const res = await fetch(`https://notion-api.nvme0n1p.dev/v2/posts/${slug}`) if (!res.ok) throw new Error(`Failed to fetch post: ${res.status}`) const data = (await res.json()) as NotionPost return data diff --git a/src/lib/notion/client.ts b/src/lib/notion/client.ts index 2949cfe..e35174a 100644 --- a/src/lib/notion/client.ts +++ b/src/lib/notion/client.ts @@ -1,11 +1,11 @@ -import { POSTS_API_URL } from '../data-utils' + import type { Post } from '../interfaces' export async function getPostByPageId(pageId: string): Promise { if (!pageId) return null try { - const res = await fetch(POSTS_API_URL) + const res = await fetch("https://notion-api.nvme0n1p.dev/v2/posts") if (!res.ok) throw new Error(`Failed to fetch posts: ${res.status}`) const payload = (await res.json()) as { posts?: any[] }