fix: install clean-deep

This commit is contained in:
Christel Westerberg
2024-05-15 13:20:43 +02:00
parent 863d99ad44
commit cd33e17775
6 changed files with 55 additions and 27 deletions
@@ -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 =