This commit is contained in:
Tben 2022-08-10 17:11:06 +01:00
parent 3867bba46e
commit 75df1bb467
2 changed files with 7 additions and 3 deletions

View File

@ -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,

View File

@ -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: {