fix: retrieve drafts on staging
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 2m44s
Build & Deploy / 🏗️ Build (push) Successful in 3m56s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 34m12s
Build & Deploy / ⚡ Performance & Accessibility (push) Successful in 5m55s
Build & Deploy / 🔔 Notify (push) Successful in 2s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 2m44s
Build & Deploy / 🏗️ Build (push) Successful in 3m56s
Build & Deploy / 🚀 Deploy (push) Successful in 18s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 34m12s
Build & Deploy / ⚡ Performance & Accessibility (push) Successful in 5m55s
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -59,7 +59,7 @@ export async function getPostBySlug(slug: string, locale: string): Promise<PostD
|
||||
try {
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const { docs } = await payload.find({
|
||||
collection: 'posts',
|
||||
where: {
|
||||
@@ -107,7 +107,7 @@ export async function getPostBySlug(slug: string, locale: string): Promise<PostD
|
||||
export async function getAllPosts(locale: string): Promise<PostData[]> {
|
||||
try {
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const { docs } = await payload.find({
|
||||
collection: 'posts',
|
||||
where: {
|
||||
|
||||
@@ -26,7 +26,7 @@ export async function getProductMetadata(
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
const fileSlug = await mapSlugToFileSlug(slug, locale);
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const result = await payload.find({
|
||||
collection: 'products',
|
||||
where: {
|
||||
@@ -70,7 +70,7 @@ export async function getProductBySlug(slug: string, locale: string): Promise<Pr
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
const fileSlug = await mapSlugToFileSlug(slug, locale);
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const result = await payload.find({
|
||||
collection: 'products',
|
||||
where: {
|
||||
@@ -127,7 +127,7 @@ export async function getProductBySlug(slug: string, locale: string): Promise<Pr
|
||||
export async function getAllProductSlugs(locale: string): Promise<string[]> {
|
||||
try {
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const result = await payload.find({
|
||||
collection: 'products',
|
||||
where: {
|
||||
@@ -157,7 +157,7 @@ export async function getAllProducts(locale: string): Promise<ProductData[]> {
|
||||
images: true,
|
||||
} as const;
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging';
|
||||
const result = await payload.find({
|
||||
collection: 'products',
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user