updates
This commit is contained in:
parent
3867bba46e
commit
75df1bb467
@ -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,
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user