From cc540656faafcfd398c4dc0180f98e7ad552997b Mon Sep 17 00:00:00 2001 From: Ali Amori Kadhim Date: Tue, 1 Aug 2023 17:56:47 +0200 Subject: [PATCH] Revert "chore: update the backend-url" This reverts commit 78a1e3d7ca34e05ebc72858589cbedf422d1c60f. --- .../src/app/[locale]/[...not-found]/page.tsx | 2 +- apps/frontend/src/app/[locale]/demo/page.tsx | 2 +- apps/frontend/src/app/[locale]/not-found.tsx | 2 +- apps/frontend/src/app/[locale]/page.tsx | 2 +- .../src/app/[locale]/products/[slug]/page.tsx | 2 +- .../[locale]/products/alphabet/[q]/page.tsx | 4 ++-- .../src/app/[locale]/products/page.tsx | 2 +- .../samenwerkendecatalogi.xml/route.ts | 2 +- .../app/[locale]/search/tips/[query]/page.tsx | 2 +- .../src/app/[locale]/sitemap.xml/route.tsx | 2 +- .../src/app/api/current-pathname/route.ts | 2 +- apps/frontend/src/app/api/preview/route.ts | 2 +- .../components/components/vng-attributes.json | 21 +++++++++++++++---- 13 files changed, 30 insertions(+), 17 deletions(-) diff --git a/apps/frontend/src/app/[locale]/[...not-found]/page.tsx b/apps/frontend/src/app/[locale]/[...not-found]/page.tsx index 7c0546da1..ec3a1d2f8 100644 --- a/apps/frontend/src/app/[locale]/[...not-found]/page.tsx +++ b/apps/frontend/src/app/[locale]/[...not-found]/page.tsx @@ -5,7 +5,7 @@ import { fetchData } from '@/util/fetchData'; const NotFoundPage = async ({ params: { locale } }: { params: { locale: string } }) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_NOT_FOUND_PAGE, variables: { locale: locale }, }); diff --git a/apps/frontend/src/app/[locale]/demo/page.tsx b/apps/frontend/src/app/[locale]/demo/page.tsx index b5ae42f4b..f6654ceb3 100644 --- a/apps/frontend/src/app/[locale]/demo/page.tsx +++ b/apps/frontend/src/app/[locale]/demo/page.tsx @@ -7,7 +7,7 @@ import { fetchData } from '@/util/fetchData'; const Demo = async ({ params: { locale } }: { params: { locale: string } }) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_VISUALISATIES, variables: { locale: locale }, }); diff --git a/apps/frontend/src/app/[locale]/not-found.tsx b/apps/frontend/src/app/[locale]/not-found.tsx index 6a505aca6..6500023ad 100644 --- a/apps/frontend/src/app/[locale]/not-found.tsx +++ b/apps/frontend/src/app/[locale]/not-found.tsx @@ -7,7 +7,7 @@ import { fetchData } from '@/util/fetchData'; const NotFoundPage = async () => { const locale = cookies().get('i18next')?.value; const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_NOT_FOUND_PAGE, variables: { locale: locale }, }); diff --git a/apps/frontend/src/app/[locale]/page.tsx b/apps/frontend/src/app/[locale]/page.tsx index 1feecc1d7..00b3c6ab1 100644 --- a/apps/frontend/src/app/[locale]/page.tsx +++ b/apps/frontend/src/app/[locale]/page.tsx @@ -32,7 +32,7 @@ const Home = async ({ params: { locale } }: { params: any }) => { const productsAvailability = alphabet.map(async (letter) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: CHECK_ALPHABETICALLY_PRODUCTS_AVAILABILITY, variables: { locale, startsWith: letter }, }); diff --git a/apps/frontend/src/app/[locale]/products/[slug]/page.tsx b/apps/frontend/src/app/[locale]/products/[slug]/page.tsx index e79e892a6..b09abc244 100644 --- a/apps/frontend/src/app/[locale]/products/[slug]/page.tsx +++ b/apps/frontend/src/app/[locale]/products/[slug]/page.tsx @@ -17,7 +17,7 @@ import { fetchData } from '@/util/fetchData'; const getAllProducts = async (locale: string, slug: string) => { const { isEnabled } = draftMode(); const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_PRODUCT_BY_SLUG_FETCH, variables: { slug: slug, diff --git a/apps/frontend/src/app/[locale]/products/alphabet/[q]/page.tsx b/apps/frontend/src/app/[locale]/products/alphabet/[q]/page.tsx index d2382382b..bd0f970af 100644 --- a/apps/frontend/src/app/[locale]/products/alphabet/[q]/page.tsx +++ b/apps/frontend/src/app/[locale]/products/alphabet/[q]/page.tsx @@ -45,7 +45,7 @@ const mappingProducts = (products: Product[]): { title: string; url: string }[] const fetchAllProducts = async ({ locale, page, pageSize, startsWith }: fetchAllProductsTypes) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_ALPHABETICALLY_PRODUCTS_BY_LETTER, variables: { locale, page, pageSize, startsWith }, }); @@ -89,7 +89,7 @@ const ProductsAlphabetPage = async ({ params: { locale, q } }: Params) => { const productsAvailability = alphabet.map(async (letter) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: CHECK_ALPHABETICALLY_PRODUCTS_AVAILABILITY, variables: { locale, startsWith: letter }, }); diff --git a/apps/frontend/src/app/[locale]/products/page.tsx b/apps/frontend/src/app/[locale]/products/page.tsx index cd19c3bfd..074809f2e 100644 --- a/apps/frontend/src/app/[locale]/products/page.tsx +++ b/apps/frontend/src/app/[locale]/products/page.tsx @@ -41,7 +41,7 @@ const mappingProducts = (products: Product[]): { title: string; url: string }[] const fetchAllProducts = async ({ locale, page, pageSize }: fetchAllProductsTypes) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_ALL_PRODUCTS_SLUG_FETCH, variables: { locale, page, pageSize }, }); diff --git a/apps/frontend/src/app/[locale]/samenwerkendecatalogi.xml/route.ts b/apps/frontend/src/app/[locale]/samenwerkendecatalogi.xml/route.ts index 1bc56aa96..19acf962f 100644 --- a/apps/frontend/src/app/[locale]/samenwerkendecatalogi.xml/route.ts +++ b/apps/frontend/src/app/[locale]/samenwerkendecatalogi.xml/route.ts @@ -5,7 +5,7 @@ import { fetchData } from '@/util/fetchData'; export async function GET(_request: NextRequest, ctx: any) { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_SAMENWERKENDECATALOGI_FETCH, variables: { locale: ctx.params.locale, diff --git a/apps/frontend/src/app/[locale]/search/tips/[query]/page.tsx b/apps/frontend/src/app/[locale]/search/tips/[query]/page.tsx index 8c08533f7..a5074511d 100644 --- a/apps/frontend/src/app/[locale]/search/tips/[query]/page.tsx +++ b/apps/frontend/src/app/[locale]/search/tips/[query]/page.tsx @@ -7,7 +7,7 @@ import { fetchData } from '@/util/fetchData'; const getSearchTipsPage = async (locale: string) => { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_SEARCH_TIP_PAGE, variables: { locale: locale }, }); diff --git a/apps/frontend/src/app/[locale]/sitemap.xml/route.tsx b/apps/frontend/src/app/[locale]/sitemap.xml/route.tsx index 617a4962e..cbd36968d 100644 --- a/apps/frontend/src/app/[locale]/sitemap.xml/route.tsx +++ b/apps/frontend/src/app/[locale]/sitemap.xml/route.tsx @@ -27,7 +27,7 @@ const generateStaticPagesPath = (locales: typeof languages, paths: string[]) => export async function GET() { try { const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_ALL_PRODUCTS_SLUG_FETCH, variables: { locale: 'all', diff --git a/apps/frontend/src/app/api/current-pathname/route.ts b/apps/frontend/src/app/api/current-pathname/route.ts index 347e4ef42..6ee650761 100644 --- a/apps/frontend/src/app/api/current-pathname/route.ts +++ b/apps/frontend/src/app/api/current-pathname/route.ts @@ -16,7 +16,7 @@ export async function GET(request: Request) { const cookieStore = cookies(); cookieStore.set('slug', slug); const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_PRODUCT_BY_SLUG_FETCH, variables: { slug: slug, diff --git a/apps/frontend/src/app/api/preview/route.ts b/apps/frontend/src/app/api/preview/route.ts index 8a148b1c8..3f7eaa248 100644 --- a/apps/frontend/src/app/api/preview/route.ts +++ b/apps/frontend/src/app/api/preview/route.ts @@ -20,7 +20,7 @@ export async function GET(request: Request) { // Fetch the headless CMS to check if the provided `slug` exists const { data } = await fetchData({ - url: `${process.env.STRAPI_IMAGE_URL}/graphql` as string, + url: process.env.STRAPI_BACKEND_URL as string, query: GET_PRODUCT_BY_SLUG_AND_LOCALE_FETCH, variables: { slug: slug, diff --git a/apps/strapi-dashboard/src/components/components/vng-attributes.json b/apps/strapi-dashboard/src/components/components/vng-attributes.json index f1d45f536..2f3b81172 100644 --- a/apps/strapi-dashboard/src/components/components/vng-attributes.json +++ b/apps/strapi-dashboard/src/components/components/vng-attributes.json @@ -8,18 +8,27 @@ "attributes": { "singleDigitalGateway": { "type": "enumeration", - "enum": ["ja", "nee"], + "enum": [ + "ja", + "nee" + ], "required": true, "private": true }, "attachementAdded": { "type": "enumeration", - "enum": ["ja", "nee"], + "enum": [ + "ja", + "nee" + ], "private": true }, "linkedEForm": { "type": "enumeration", - "enum": ["ja", "nee"], + "enum": [ + "ja", + "nee" + ], "private": true, "required": true }, @@ -38,7 +47,11 @@ }, "identificationMethod": { "type": "enumeration", - "enum": ["digid", "eherkenning", "eidas"] + "enum": [ + "digid", + "eherkenning", + "eidas" + ] } } }