From 75df1bb4671ab3d4273fe984916a1cdbc0b08ae0 Mon Sep 17 00:00:00 2001 From: Tben <52448020+BenjaminToby@users.noreply.github.com> Date: Wed, 10 Aug 2022 17:11:06 +0100 Subject: [PATCH] updates --- pages/blog/[single].jsx | 4 ++-- pages/blog/index.jsx | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/blog/[single].jsx b/pages/blog/[single].jsx index 20fbdef..b1b454e 100644 --- a/pages/blog/[single].jsx +++ b/pages/blog/[single].jsx @@ -114,7 +114,7 @@ export async function getStaticProps({ params }) { .get( /** ********************* Get Options object */ { - host: "datasquirel.tben.me", + host: "datasquirel.com", path: `/api/query/get?db=tbenme&query=select+*+from+blog_posts+where+slug='${params.single}'`, headers: { Authorization: process.env.DATASQUIREL_API_KEY, @@ -200,7 +200,7 @@ export async function getStaticPaths() { .get( /** ********************* Get Options object */ { - host: "datasquirel.tben.me", + host: "datasquirel.com", path: `/api/query/get?db=tbenme&query=select+slug+from+blog_posts`, headers: { Authorization: process.env.DATASQUIREL_API_KEY, diff --git a/pages/blog/index.jsx b/pages/blog/index.jsx index e0f50ce..10d02c4 100644 --- a/pages/blog/index.jsx +++ b/pages/blog/index.jsx @@ -140,7 +140,7 @@ export async function getStaticProps({ req, res, query }) { .get( /** ********************* Get Options object */ { - host: "datasquirel.tben.me", + host: "datasquirel.com", path: `/api/query/get?db=tbenme&query=select+title,slug,excerpt,date_created+from+blog_posts+limit+10`, headers: { Authorization: process.env.DATASQUIREL_API_KEY, @@ -172,6 +172,10 @@ export async function getStaticProps({ req, res, query }) { .end(); }); + console.log('===================================='); + console.log(postsResponse); + console.log('===================================='); + if (!postsResponse.success) { return { redirect: {