@stamhoofd/models 2.78.1 → 2.78.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/dist/src/factories/GroupFactory.d.ts +0 -3
- package/dist/src/factories/GroupFactory.d.ts.map +1 -1
- package/dist/src/factories/GroupFactory.js +0 -20
- package/dist/src/factories/GroupFactory.js.map +1 -1
- package/dist/src/factories/MemberFactory.js +2 -2
- package/dist/src/factories/MemberFactory.js.map +1 -1
- package/dist/src/factories/UserFactory.d.ts.map +1 -1
- package/dist/src/factories/UserFactory.js +7 -4
- package/dist/src/factories/UserFactory.js.map +1 -1
- package/dist/src/helpers/EmailBuilder.d.ts +2 -1
- package/dist/src/helpers/EmailBuilder.d.ts.map +1 -1
- package/dist/src/helpers/EmailBuilder.js +36 -4
- package/dist/src/helpers/EmailBuilder.js.map +1 -1
- package/dist/src/models/Email.d.ts.map +1 -1
- package/dist/src/models/Email.js +39 -38
- package/dist/src/models/Email.js.map +1 -1
- package/dist/src/models/Email.test.d.ts +2 -0
- package/dist/src/models/Email.test.d.ts.map +1 -0
- package/dist/src/models/Email.test.js +461 -0
- package/dist/src/models/Email.test.js.map +1 -0
- package/dist/src/models/Organization.d.ts +0 -7
- package/dist/src/models/Organization.d.ts.map +1 -1
- package/dist/src/models/Organization.js +0 -11
- package/dist/src/models/Organization.js.map +1 -1
- package/dist/tests/jest.global.setup.d.ts.map +1 -1
- package/dist/tests/jest.global.setup.js +11 -1
- package/dist/tests/jest.global.setup.js.map +1 -1
- package/dist/tests/jest.setup.js +14 -0
- package/dist/tests/jest.setup.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/factories/GroupFactory.ts +0 -21
- package/src/factories/MemberFactory.ts +2 -2
- package/src/factories/UserFactory.ts +7 -4
- package/src/helpers/EmailBuilder.ts +43 -6
- package/src/models/Email.test.ts +533 -0
- package/src/models/Email.ts +42 -42
- package/src/models/Organization.ts +0 -14
|
@@ -176,20 +176,6 @@ export class Organization extends QueryableModel {
|
|
|
176
176
|
return this.fromRow(rows[0][this.table]);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
/**
|
|
180
|
-
* Get an Organization by looking at the host of a request
|
|
181
|
-
* Format is 2331c59a-0cbe-4279-871c-ea9d0474cd54.api.stamhoofd.app
|
|
182
|
-
* + switch country if needed
|
|
183
|
-
*/
|
|
184
|
-
static async getFromRequest(request: DecodedRequest<any, any, any>): Promise<Organization> {
|
|
185
|
-
const organization = await Organization.fromApiHost(request.host);
|
|
186
|
-
|
|
187
|
-
const i18n = I18n.fromRequest(request);
|
|
188
|
-
i18n.switchToLocale({ country: organization.address.country });
|
|
189
|
-
|
|
190
|
-
return organization;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
179
|
/**
|
|
194
180
|
* Get an Organization by looking at the host of a request
|
|
195
181
|
* Format is 2331c59a-0cbe-4279-871c-ea9d0474cd54.api.stamhoofd.app
|