fix: install clean-deep
This commit is contained in:
@@ -6,13 +6,13 @@ import { request } from "@/lib/graphql/request"
|
||||
import { badRequestError, internalServerError } from "@/server/errors/trpc"
|
||||
import { publicProcedure, router } from "@/server/trpc"
|
||||
|
||||
import { removeEmptyObjects } from "@/utils/contentType"
|
||||
import {
|
||||
generateRefsResponseTag,
|
||||
generateTag,
|
||||
generateTags,
|
||||
} from "@/utils/generateTag"
|
||||
|
||||
import { removeEmptyObjects } from "../../utils"
|
||||
import { getAccountPageInput } from "./input"
|
||||
import {
|
||||
type AccountPage,
|
||||
@@ -51,6 +51,9 @@ export const accountPageQueryRouter = router({
|
||||
throw internalServerError()
|
||||
}
|
||||
|
||||
// Remove empty objects from a fetched content type. Needed since
|
||||
// Contentstack returns empty objects for all non queried blocks in modular blocks.
|
||||
// This is an ongoing support case in Contentstack, ticker number #00031579
|
||||
const cleanedData = removeEmptyObjects(refsResponse.data)
|
||||
|
||||
const validatedAccountPageRefs =
|
||||
@@ -71,7 +74,7 @@ export const accountPageQueryRouter = router({
|
||||
validatedAccountPageRefs.data.all_account_page.items[0].system.uid
|
||||
)
|
||||
)
|
||||
const response = await request<AccountPage>(
|
||||
const response = await request<AccountPageRefsDataRaw>(
|
||||
GetAccountPage,
|
||||
{
|
||||
locale: lang,
|
||||
|
||||
@@ -7,13 +7,13 @@ import { _ } from "@/lib/translation"
|
||||
import { badRequestError, internalServerError } from "@/server/errors/trpc"
|
||||
import { publicProcedure, router } from "@/server/trpc"
|
||||
|
||||
import { removeEmptyObjects } from "@/utils/contentType"
|
||||
import {
|
||||
generateRefsResponseTag,
|
||||
generateTag,
|
||||
generateTags,
|
||||
} from "@/utils/generateTag"
|
||||
|
||||
import { removeEmptyObjects } from "../../utils"
|
||||
import { getLoyaltyPageInput } from "./input"
|
||||
import {
|
||||
type LoyaltyPage,
|
||||
@@ -56,6 +56,9 @@ export const loyaltyPageQueryRouter = router({
|
||||
throw internalServerError()
|
||||
}
|
||||
|
||||
// Remove empty objects from a fetched content type. Needed since
|
||||
// Contentstack returns empty objects for all non queried blocks in modular blocks.
|
||||
// This is an ongoing support case in Contentstack, ticker number #00031579
|
||||
const cleanedData = removeEmptyObjects(refsResponse.data)
|
||||
|
||||
const validatedLoyaltyPageRefs =
|
||||
|
||||
Reference in New Issue
Block a user