Changed organisation* to organization* in descriptions, comments and endoints ✏

ref #117
This commit is contained in:
2021-01-24 18:34:15 +01:00
parent 5660aecb50
commit ef15d0d576
46 changed files with 145 additions and 145 deletions

View File

@@ -10,14 +10,14 @@ import { CreateRunnerGroup } from './CreateRunnerGroup';
*/
export class CreateRunnerOrganisation extends CreateRunnerGroup {
/**
* The new organisation's address.
* The new organization's address.
*/
@IsOptional()
@IsObject()
address?: Address;
/**
* Is registration enabled for the new organisation?
* Is registration enabled for the new organization?
*/
@IsOptional()
@IsBoolean()

View File

@@ -17,14 +17,14 @@ export class UpdateRunnerOrganisation extends CreateRunnerGroup {
id: number;
/**
* The updated organisation's address.
* The updated organization's address.
*/
@IsOptional()
@IsObject()
address?: Address;
/**
* Is registration enabled for the updated organisation?
* Is registration enabled for the updated organization?
*/
@IsOptional()
@IsBoolean()
@@ -33,21 +33,21 @@ export class UpdateRunnerOrganisation extends CreateRunnerGroup {
/**
* Updates a provided RunnerOrganisation entity based on this.
*/
public async update(organisation: RunnerOrganisation): Promise<RunnerOrganisation> {
public async update(organization: RunnerOrganisation): Promise<RunnerOrganisation> {
organisation.name = this.name;
organisation.contact = await this.getContact();
if (!this.address) { organisation.address.reset(); }
else { organisation.address = this.address; }
Address.validate(organisation.address);
organization.name = this.name;
organization.contact = await this.getContact();
if (!this.address) { organization.address.reset(); }
else { organization.address = this.address; }
Address.validate(organization.address);
if (this.registrationEnabled && !organisation.key) {
organisation.key = uuid.v4().toUpperCase();
if (this.registrationEnabled && !organization.key) {
organization.key = uuid.v4().toUpperCase();
}
else {
organisation.key = null;
organization.key = null;
}
return organisation;
return organization;
}
}