Renamed files and classed from *Organisation* to *Organization*📝

ref #117
This commit is contained in:
2021-01-24 18:40:46 +01:00
parent ef15d0d576
commit c6c643ecf1
21 changed files with 252 additions and 252 deletions

View File

@@ -1,13 +1,13 @@
import { IsBoolean, IsInt, IsObject, IsOptional } from 'class-validator';
import * as uuid from 'uuid';
import { Address } from '../../entities/Address';
import { RunnerOrganisation } from '../../entities/RunnerOrganisation';
import { RunnerOrganization } from '../../entities/RunnerOrganization';
import { CreateRunnerGroup } from '../create/CreateRunnerGroup';
/**
* This class is used to update a RunnerOrganisation entity (via put request).
* This class is used to update a RunnerOrganization entity (via put request).
*/
export class UpdateRunnerOrganisation extends CreateRunnerGroup {
export class UpdateRunnerOrganization extends CreateRunnerGroup {
/**
* The updated orgs's id.
@@ -31,9 +31,9 @@ export class UpdateRunnerOrganisation extends CreateRunnerGroup {
registrationEnabled?: boolean = false;
/**
* Updates a provided RunnerOrganisation entity based on this.
* Updates a provided RunnerOrganization entity based on this.
*/
public async update(organization: RunnerOrganisation): Promise<RunnerOrganisation> {
public async update(organization: RunnerOrganization): Promise<RunnerOrganization> {
organization.name = this.name;
organization.contact = await this.getContact();

View File

@@ -1,8 +1,8 @@
import { IsInt, IsPositive } from 'class-validator';
import { getConnectionManager } from 'typeorm';
import { RunnerOrganisationNotFoundError } from '../../../errors/RunnerOrganisationErrors';
import { RunnerOrganizationNotFoundError } from '../../../errors/RunnerOrganizationErrors';
import { RunnerTeamNeedsParentError } from '../../../errors/RunnerTeamErrors';
import { RunnerOrganisation } from '../../entities/RunnerOrganisation';
import { RunnerOrganization } from '../../entities/RunnerOrganization';
import { RunnerTeam } from '../../entities/RunnerTeam';
import { CreateRunnerGroup } from '../create/CreateRunnerGroup';
@@ -28,12 +28,12 @@ export class UpdateRunnerTeam extends CreateRunnerGroup {
/**
* Loads the updated teams's parentGroup based on it's id.
*/
public async getParent(): Promise<RunnerOrganisation> {
public async getParent(): Promise<RunnerOrganization> {
if (this.parentGroup === undefined || this.parentGroup === null) {
throw new RunnerTeamNeedsParentError();
}
let parentGroup = await getConnectionManager().get().getRepository(RunnerOrganisation).findOne({ id: this.parentGroup });
if (!parentGroup) { throw new RunnerOrganisationNotFoundError();; }
let parentGroup = await getConnectionManager().get().getRepository(RunnerOrganization).findOne({ id: this.parentGroup });
if (!parentGroup) { throw new RunnerOrganizationNotFoundError();; }
return parentGroup;
}