diff --git a/pages/games.tsx b/pages/games.tsx index 8193f41..17ce412 100644 --- a/pages/games.tsx +++ b/pages/games.tsx @@ -55,7 +55,7 @@ function Servers(props: LinkList) { } export async function getServerSideProps() { - const filePath = path.join(process.cwd(), '/confs/pages.json') + const filePath = path.join(process.cwd(), '/public/pages.json') const jsonData = await fsPromises.readFile(filePath) const list = JSON.parse(jsonData.toString()) diff --git a/pages/services.tsx b/pages/services.tsx index 2f2d63c..2ce661c 100644 --- a/pages/services.tsx +++ b/pages/services.tsx @@ -40,9 +40,9 @@ function Services(props: LinkList) { ) } -// Gets a List of all services specified in /confs/pages.json +// Gets a List of all services specified in /public/pages.json export async function getServerSideProps() { - const filePath = path.join(process.cwd(), './confs/pages.json') + const filePath = path.join(process.cwd(), '/public/pages.json') // TODO: look into asyncing this API call const jsonData = await fsPromises.readFile(filePath) const list = JSON.parse(jsonData.toString())