change port 4023 to 4024
This commit is contained in:
@@ -21,7 +21,7 @@ async function getTopicPost(slug: string): Promise<ITopic | null> {
|
||||
const baseUrl =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? `${process.env.NEXTAUTH_URL || 'https://siliconpin.com'}`
|
||||
: 'http://localhost:4023'
|
||||
: 'http://localhost:4024'
|
||||
|
||||
const response = await fetch(`${baseUrl}/api/topics/${encodeURIComponent(slug)}`, {
|
||||
headers: {
|
||||
@@ -58,7 +58,7 @@ async function getRelatedPosts(slug: string, limit: number = 2): Promise<ITopic[
|
||||
const baseUrl =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? `${process.env.NEXTAUTH_URL || 'https://siliconpin.com'}`
|
||||
: 'http://localhost:4023'
|
||||
: 'http://localhost:4024'
|
||||
|
||||
const response = await fetch(
|
||||
`${baseUrl}/api/topics/${encodeURIComponent(slug)}/related?limit=${limit}`,
|
||||
|
||||
@@ -86,7 +86,7 @@ async function getTopics(searchParams: Promise<{ [key: string]: string | string[
|
||||
const baseUrl =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? `${process.env.NEXTAUTH_URL || 'https://siliconpin.com'}`
|
||||
: 'http://localhost:4023'
|
||||
: 'http://localhost:4024'
|
||||
|
||||
const searchQuery = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
@@ -144,7 +144,7 @@ async function getTags(): Promise<Array<{ id: string; name: string }>> {
|
||||
const baseUrl =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? `${process.env.NEXTAUTH_URL || 'https://siliconpin.com'}`
|
||||
: 'http://localhost:4023'
|
||||
: 'http://localhost:4024'
|
||||
|
||||
const response = await fetch(`${baseUrl}/api/topics/tags`, {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user