fix: change SSR fetch URLs from 4000 to 4001

This commit is contained in:
پارسا آقایی 2026-06-12 23:21:56 +03:30
parent dcfc4acae4
commit e09adc03c3
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import type { Metadata } from 'next';
async function getBlog(slug: string) {
try {
const res = await fetch(`http://localhost:4000/api/blogs/${slug}`, { next: { revalidate: 60 } });
const res = await fetch(`http://localhost:4001/api/blogs/${slug}`, { next: { revalidate: 60 } });
if (!res.ok) throw new Error('Failed to fetch blog');
const b = await res.json();
return {

View File

@ -8,7 +8,7 @@ export const metadata: Metadata = {
async function getBlogs() {
try {
const res = await fetch('http://localhost:4000/api/blogs', { next: { revalidate: 60 } });
const res = await fetch('http://localhost:4001/api/blogs', { next: { revalidate: 60 } });
if (!res.ok) throw new Error('Failed to fetch blogs');
const data = await res.json();
return data.map((b: any) => ({