@stamhoofd/backend 2.83.2 → 2.83.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.83.
|
|
3
|
+
"version": "2.83.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"@simonbackx/simple-encoding": "2.22.0",
|
|
39
39
|
"@simonbackx/simple-endpoints": "1.19.1",
|
|
40
40
|
"@simonbackx/simple-logging": "^1.0.1",
|
|
41
|
-
"@stamhoofd/backend-i18n": "2.83.
|
|
42
|
-
"@stamhoofd/backend-middleware": "2.83.
|
|
43
|
-
"@stamhoofd/email": "2.83.
|
|
44
|
-
"@stamhoofd/models": "2.83.
|
|
45
|
-
"@stamhoofd/queues": "2.83.
|
|
46
|
-
"@stamhoofd/sql": "2.83.
|
|
47
|
-
"@stamhoofd/structures": "2.83.
|
|
48
|
-
"@stamhoofd/utility": "2.83.
|
|
41
|
+
"@stamhoofd/backend-i18n": "2.83.3",
|
|
42
|
+
"@stamhoofd/backend-middleware": "2.83.3",
|
|
43
|
+
"@stamhoofd/email": "2.83.3",
|
|
44
|
+
"@stamhoofd/models": "2.83.3",
|
|
45
|
+
"@stamhoofd/queues": "2.83.3",
|
|
46
|
+
"@stamhoofd/sql": "2.83.3",
|
|
47
|
+
"@stamhoofd/structures": "2.83.3",
|
|
48
|
+
"@stamhoofd/utility": "2.83.3",
|
|
49
49
|
"archiver": "^7.0.1",
|
|
50
50
|
"aws-sdk": "^2.885.0",
|
|
51
51
|
"axios": "1.6.8",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "1d81ad636d7a240301dc6dcd2725549d4846fe1c"
|
|
69
69
|
}
|
|
@@ -257,12 +257,12 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
257
257
|
const existingRegistrations = await Registration.where({ memberId: member.id, groupId: item.groupId, cycle: group.cycle, periodId: group.periodId, registeredAt: { sign: '!=', value: null } });
|
|
258
258
|
|
|
259
259
|
for (const existingRegistration of existingRegistrations) {
|
|
260
|
-
if (item.replaceRegistrations.some(r => r.id === existingRegistration.id)) {
|
|
260
|
+
if (item.replaceRegistrations.some(r => r.registration.id === existingRegistration.id)) {
|
|
261
261
|
// Safe
|
|
262
262
|
continue;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
if (checkout.cart.deleteRegistrations.some(r => r.id === existingRegistration.id)) {
|
|
265
|
+
if (checkout.cart.deleteRegistrations.some(r => r.registration.id === existingRegistration.id)) {
|
|
266
266
|
// Safe
|
|
267
267
|
continue;
|
|
268
268
|
}
|
|
@@ -279,7 +279,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
279
279
|
|
|
280
280
|
if (item.replaceRegistrations.length === 1) {
|
|
281
281
|
// Try to reuse this specific one
|
|
282
|
-
reuseRegistration = (await Registration.getByID(item.replaceRegistrations[0].id)) ?? null;
|
|
282
|
+
reuseRegistration = (await Registration.getByID(item.replaceRegistrations[0].registration.id)) ?? null;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
let startDate = item.calculatedStartDate;
|
|
@@ -327,7 +327,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
327
327
|
if (whoWillPayNow === 'nobody' && item.replaceRegistrations.length > 0) {
|
|
328
328
|
// If the replace registration was paid by an organization
|
|
329
329
|
// Make sure this updated registration will also be paid by the organization, not the member
|
|
330
|
-
const paidAsOrganization = item.replaceRegistrations[0].payingOrganizationId;
|
|
330
|
+
const paidAsOrganization = item.replaceRegistrations[0].registration.payingOrganizationId;
|
|
331
331
|
if (paidAsOrganization) {
|
|
332
332
|
registration.payingOrganizationId = paidAsOrganization;
|
|
333
333
|
}
|
|
@@ -389,7 +389,7 @@ export class RegisterMembersEndpoint extends Endpoint<Params, Query, Body, Respo
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
const existingRegistration = await Registration.getByID(registrationStruct.id);
|
|
392
|
+
const existingRegistration = await Registration.getByID(registrationStruct.registration.id);
|
|
393
393
|
if (!existingRegistration || existingRegistration.organizationId !== organization.id) {
|
|
394
394
|
throw new SimpleError({
|
|
395
395
|
code: 'invalid_data',
|