@stamhoofd/backend 2.77.2 → 2.77.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamhoofd/backend",
3
- "version": "2.77.2",
3
+ "version": "2.77.3",
4
4
  "main": "./dist/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -37,14 +37,14 @@
37
37
  "@simonbackx/simple-encoding": "2.20.0",
38
38
  "@simonbackx/simple-endpoints": "1.19.1",
39
39
  "@simonbackx/simple-logging": "^1.0.1",
40
- "@stamhoofd/backend-i18n": "2.77.2",
41
- "@stamhoofd/backend-middleware": "2.77.2",
42
- "@stamhoofd/email": "2.77.2",
43
- "@stamhoofd/models": "2.77.2",
44
- "@stamhoofd/queues": "2.77.2",
45
- "@stamhoofd/sql": "2.77.2",
46
- "@stamhoofd/structures": "2.77.2",
47
- "@stamhoofd/utility": "2.77.2",
40
+ "@stamhoofd/backend-i18n": "2.77.3",
41
+ "@stamhoofd/backend-middleware": "2.77.3",
42
+ "@stamhoofd/email": "2.77.3",
43
+ "@stamhoofd/models": "2.77.3",
44
+ "@stamhoofd/queues": "2.77.3",
45
+ "@stamhoofd/sql": "2.77.3",
46
+ "@stamhoofd/structures": "2.77.3",
47
+ "@stamhoofd/utility": "2.77.3",
48
48
  "archiver": "^7.0.1",
49
49
  "aws-sdk": "^2.885.0",
50
50
  "axios": "1.6.8",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "8106bfebe63c39050eb31749e0c65ea9ddae08d7"
67
+ "gitHead": "73e6c9aec7a8e3feed99014f54fdae6890b346ce"
68
68
  }
@@ -138,9 +138,18 @@ export class PatchOrganizationEndpoint extends Endpoint<Params, Query, Body, Res
138
138
 
139
139
  // Apply payconiq patch
140
140
  if (request.body.privateMeta.payconiqAccounts !== undefined) {
141
+ const originalAccounts = organization.privateMeta.payconiqAccounts;
142
+
143
+ // Ignore patches of payconiq accounts which contain a placeholder key
141
144
  organization.privateMeta.payconiqAccounts = patchObject(organization.privateMeta.payconiqAccounts, cloneObject(request.body.privateMeta.payconiqAccounts as any));
142
145
 
143
146
  for (const account of organization.privateMeta.payconiqAccounts) {
147
+ if (account.apiKey === PayconiqAccount.placeholderApiKey) {
148
+ // Reset back to original
149
+ organization.privateMeta.payconiqAccounts = originalAccounts;
150
+ break;
151
+ }
152
+
144
153
  if (account.merchantId === null) {
145
154
  const payment = await PayconiqPayment.createTest(organization, account);
146
155
 
@@ -254,7 +254,7 @@ export class AuthenticatedStructures {
254
254
  result = OrganizationStruct.create({
255
255
  ...baseStruct,
256
256
  period,
257
- privateMeta: organization.privateMeta,
257
+ privateMeta: organization.privateMeta.removedPrivateKeys,
258
258
  webshops: webshopPreviews.get(organization.id)?.sort((a, b) => Sorter.byDateValue(b.createdAt, a.createdAt)),
259
259
  });
260
260
  }