@stamhoofd/backend 2.95.0 → 2.95.1

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.95.0",
3
+ "version": "2.95.1",
4
4
  "main": "./dist/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -45,14 +45,14 @@
45
45
  "@simonbackx/simple-encoding": "2.22.0",
46
46
  "@simonbackx/simple-endpoints": "1.20.1",
47
47
  "@simonbackx/simple-logging": "^1.0.1",
48
- "@stamhoofd/backend-i18n": "2.95.0",
49
- "@stamhoofd/backend-middleware": "2.95.0",
50
- "@stamhoofd/email": "2.95.0",
51
- "@stamhoofd/models": "2.95.0",
52
- "@stamhoofd/queues": "2.95.0",
53
- "@stamhoofd/sql": "2.95.0",
54
- "@stamhoofd/structures": "2.95.0",
55
- "@stamhoofd/utility": "2.95.0",
48
+ "@stamhoofd/backend-i18n": "2.95.1",
49
+ "@stamhoofd/backend-middleware": "2.95.1",
50
+ "@stamhoofd/email": "2.95.1",
51
+ "@stamhoofd/models": "2.95.1",
52
+ "@stamhoofd/queues": "2.95.1",
53
+ "@stamhoofd/sql": "2.95.1",
54
+ "@stamhoofd/structures": "2.95.1",
55
+ "@stamhoofd/utility": "2.95.1",
56
56
  "archiver": "^7.0.1",
57
57
  "axios": "^1.8.2",
58
58
  "cookie": "^0.7.0",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "baed3abb7d0814204ae52004bfec7287e397d28e"
73
+ "gitHead": "3b189532ead46117b36ae6cd67b7fea5ee86ef7d"
74
74
  }
@@ -98,12 +98,14 @@ export class CreateEmailEndpoint extends Endpoint<Params, Query, Body, ResponseB
98
98
  model.fromName = sender.name;
99
99
  }
100
100
  else {
101
- throw new SimpleError({
102
- code: 'invalid_sender',
103
- human: 'Sender not found',
104
- message: $t(`94adb4e0-2ef1-4ee8-9f02-5a76efa51c1d`),
105
- statusCode: 400,
106
- });
101
+ if (request.body.senderId) {
102
+ throw new SimpleError({
103
+ code: 'invalid_sender',
104
+ message: 'Sender not found',
105
+ human: $t(`94adb4e0-2ef1-4ee8-9f02-5a76efa51c1d`),
106
+ statusCode: 400,
107
+ });
108
+ }
107
109
  }
108
110
 
109
111
  model.validateAttachments();
@@ -78,8 +78,8 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
78
78
  else {
79
79
  throw new SimpleError({
80
80
  code: 'invalid_sender',
81
- human: 'Sender not found',
82
- message: $t(`94adb4e0-2ef1-4ee8-9f02-5a76efa51c1d`),
81
+ message: 'Sender not found',
82
+ human: $t(`94adb4e0-2ef1-4ee8-9f02-5a76efa51c1d`),
83
83
  statusCode: 400,
84
84
  });
85
85
  }
@@ -95,8 +95,8 @@ export class PatchEmailEndpoint extends Endpoint<Params, Query, Body, ResponseBo
95
95
  else {
96
96
  throw new SimpleError({
97
97
  code: 'invalid_sender',
98
- human: 'Sender not found',
99
- message: $t(`f08cccb3-faf9-473f-b729-16120fadec9c`),
98
+ message: 'Sender not found',
99
+ human: $t(`f08cccb3-faf9-473f-b729-16120fadec9c`),
100
100
  statusCode: 400,
101
101
  });
102
102
  }