From 549b1816ab201b80dfef098403c022383b87a9c1 Mon Sep 17 00:00:00 2001 From: Pascal Kaufmann Date: Tue, 26 Nov 2024 14:39:48 +0100 Subject: [PATCH] Fix regression with cookies and assortment products --- examples/kitchensink/.env.defaults | 1 + examples/kitchensink/.env.schema | 2 ++ examples/minimal/.env.defaults | 2 ++ .../src/module/configureAssortmentProductsModule.ts | 2 ++ .../core/src/services/updateUserAvatarAfterUploadService.ts | 2 +- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/kitchensink/.env.defaults b/examples/kitchensink/.env.defaults index a0ddbb5870..7c46287544 100644 --- a/examples/kitchensink/.env.defaults +++ b/examples/kitchensink/.env.defaults @@ -8,5 +8,6 @@ UNCHAINED_SEED_PASSWORD=password UNCHAINED_SECRET=secret UNCHAINED_CLOUD_ENDPOINT=https://engine.unchained.shop/graphql UNCHAINED_TOKEN_SECRET=random-token +UNCHAINED_COOKIE_SAMESITE=none REDIS_DB=0 MONGOMS_VERSION=8.0.1 \ No newline at end of file diff --git a/examples/kitchensink/.env.schema b/examples/kitchensink/.env.schema index 0028500a30..f635a29981 100644 --- a/examples/kitchensink/.env.schema +++ b/examples/kitchensink/.env.schema @@ -33,6 +33,8 @@ UNCHAINED_ASSIGN_CART_FOR_USERS= UNCHAINED_COOKIE_DOMAIN= UNCHAINED_COOKIE_PATH= UNCHAINED_COOKIE_NAME= +UNCHAINED_COOKIE_SAMESITE= +UNCHAINED_COOKIE_INSECURE= UNCHAINED_TOKEN_SECRET= DATATRANS_SECRET= DATATRANS_SIGN_KEY= diff --git a/examples/minimal/.env.defaults b/examples/minimal/.env.defaults index f736816f28..e7664a0ddd 100644 --- a/examples/minimal/.env.defaults +++ b/examples/minimal/.env.defaults @@ -8,5 +8,7 @@ UNCHAINED_SEED_PASSWORD=password UNCHAINED_SECRET=secret UNCHAINED_CLOUD_ENDPOINT=https://engine.unchained.shop/graphql UNCHAINED_TOKEN_SECRET=random-token-that-is-not-secret-at-all +UNCHAINED_COOKIE_SAMESITE=none +UNCHAINED_COOKIE_INSECURE= REDIS_DB=0 MONGOMS_VERSION=8.0.1 \ No newline at end of file diff --git a/packages/core-assortments/src/module/configureAssortmentProductsModule.ts b/packages/core-assortments/src/module/configureAssortmentProductsModule.ts index ca5889ae30..4b7f32fa33 100644 --- a/packages/core-assortments/src/module/configureAssortmentProductsModule.ts +++ b/packages/core-assortments/src/module/configureAssortmentProductsModule.ts @@ -165,6 +165,8 @@ export const configureAssortmentProductsModule = ({ if (!options?.skipInvalidation) { await invalidateCache({ assortmentIds: [assortmentProduct.assortmentId] }); } + + return assortmentProduct; }, delete: async (assortmentProductId, options) => { diff --git a/packages/core/src/services/updateUserAvatarAfterUploadService.ts b/packages/core/src/services/updateUserAvatarAfterUploadService.ts index 69252348dd..e0b18c69b2 100644 --- a/packages/core/src/services/updateUserAvatarAfterUploadService.ts +++ b/packages/core/src/services/updateUserAvatarAfterUploadService.ts @@ -19,7 +19,7 @@ export const updateUserAvatarAfterUploadService: UpdateUserAvatarAfterUploadServ { file }, context, ) => { - const { modules, services } = context; + const { modules } = context; const { userId } = file.meta as { userId: string }; const files = await modules.files.findFiles({