Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const dynamic = 'force-dynamic';
const WIDTH = 1200;
const HEIGHT = 630;

const API_BASE = process.env.NEXT_PUBLIC_API_HOST_NAME;
const API_BASE = process.env.NEXT_PUBLIC_API_HOST_NAME?.replace(/\/+$/, '');

type PartyroomOG = {
partyroomId: number;
Expand All @@ -25,7 +25,7 @@ type PartyroomOG = {

async function fetchPartyroomByLink(linkDomain: string): Promise<PartyroomOG | null> {
try {
const res = await fetch(`${API_BASE}v1/partyrooms/link/${linkDomain}`, {
const res = await fetch(`${API_BASE}/v1/partyrooms/link/${linkDomain}`, {
cache: 'no-store',
});
if (!res.ok) return null;
Expand Down
4 changes: 2 additions & 2 deletions src/app/link/[linkDomain]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Metadata } from 'next';
import { PropsWithChildren } from 'react';

const API_BASE = process.env.NEXT_PUBLIC_API_HOST_NAME;
const API_BASE = process.env.NEXT_PUBLIC_API_HOST_NAME?.replace(/\/+$/, '');

type PartyroomOG = {
title: string;
Expand All @@ -10,7 +10,7 @@ type PartyroomOG = {

async function fetchPartyroomByLink(linkDomain: string): Promise<PartyroomOG | null> {
try {
const res = await fetch(`${API_BASE}v1/partyrooms/link/${linkDomain}`, {
const res = await fetch(`${API_BASE}/v1/partyrooms/link/${linkDomain}`, {
next: { revalidate: 60 },
});
if (!res.ok) return null;
Expand Down
Loading