Skip to content

Commit 8e2783e

Browse files
committed
fix: api path change
1 parent e9a5fe6 commit 8e2783e

File tree

7 files changed

+6
-5
lines changed

7 files changed

+6
-5
lines changed
File renamed without changes.
File renamed without changes.

pages/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ export const getStaticProps: GetStaticProps<Props> = async () => {
3939

4040
const notionPostsResponse = await getNotionPosts(process.env.NOTION_POST_DATABASE_ID);
4141
const posts = parsePosts(notionPostsResponse);
42-
const categories = getCategories(notionPostsResponse);
4342
const postsWithPreview = await getPreviewImages(posts);
4443

44+
const categories = getCategories(notionPostsResponse);
45+
4546
return {
4647
props: {
4748
posts: postsWithPreview,

pages/posts/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const getStaticProps: GetStaticProps<Props, PostParams> = async ({ params
6060
const previewImages = await getPreviewImageFromRecordMap(recordMap);
6161

6262
const title = getPageTitle(recordMap) as string;
63-
const ogImage = `${siteConfig.url}/api/coverImage?pageId=${id}`;
63+
const ogImage = `${siteConfig.url}/api/cover-image?pageId=${id}`;
6464

6565
return {
6666
props: {

src/components/common/PageHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const PageHead = ({ title, description, image, keywords }: PageHeadProps) => {
1919
const pageTitle = title ? `${title} | ${siteConfig.blogName}` : siteConfig.blogName;
2020
const pageDescription = description || siteConfig.seoDefaultDesc;
2121
const pageKeywords = keywords || '';
22-
const pageImage = `${image || `${siteConfig.url}/api/profileImage`}`;
22+
const pageImage = `${image || `${siteConfig.url}/api/profile-image`}`;
2323
const pageUrl = `${siteConfig.url}${asPath}`;
2424

2525
return (

src/features/home/Intro/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { siteConfig } from 'site.config';
99

1010
import { DEFAULT_BLUR_BASE64 } from '@/assets/constants';
1111

12-
const profileImage = `/api/profileImage`;
12+
const profileImage = `/api/profile-image`;
1313

1414
const Intro = () => {
1515
return (

src/utils/previewImage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const getPreviewImages = async (posts: Post[]) => {
126126
const { id, cover } = post;
127127

128128
const previewImage = await makePreviewImage(cover);
129-
const coverFromNotion = `/api/coverImage?pageId=${id}`;
129+
const coverFromNotion = `/api/cover-image?pageId=${id}`;
130130
return {
131131
...post,
132132
previewImage,

0 commit comments

Comments
 (0)