Changed organisation* to organization* in descriptions, comments and endoints ✏
ref #117
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
| @@ -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; | ||||
|     } | ||||
| } | ||||
| @@ -16,7 +16,7 @@ import { Scan } from "./Scan"; | ||||
| export class Runner extends Participant { | ||||
|   /** | ||||
|    * The runner's associated group. | ||||
|    * Can be a runner team or organisation. | ||||
|    * Can be a runner team or organization. | ||||
|    */ | ||||
|   @IsNotEmpty() | ||||
|   @ManyToOne(() => RunnerGroup, group => group.runners) | ||||
|   | ||||
| @@ -14,21 +14,21 @@ import { RunnerTeam } from "./RunnerTeam"; | ||||
| export class RunnerOrganisation extends RunnerGroup { | ||||
|  | ||||
|   /** | ||||
|    * The organisations's address. | ||||
|    * The organizations's address. | ||||
|    */ | ||||
|   @IsOptional() | ||||
|   @Column(type => Address) | ||||
|   address?: Address; | ||||
|  | ||||
|   /** | ||||
|    * The organisation's teams. | ||||
|    * Used to link teams to a organisation. | ||||
|    * The organization's teams. | ||||
|    * Used to link teams to a organization. | ||||
|    */ | ||||
|   @OneToMany(() => RunnerTeam, team => team.parentGroup, { nullable: true }) | ||||
|   teams: RunnerTeam[]; | ||||
|  | ||||
|   /** | ||||
|    * The organisation's api key for self-service registration. | ||||
|    * The organization's api key for self-service registration. | ||||
|    * The api key can be used for the /runners/register/:token endpoint. | ||||
|    * Is has to be base64 encoded if used via the api (to keep url-safety). | ||||
|    */ | ||||
| @@ -38,7 +38,7 @@ export class RunnerOrganisation extends RunnerGroup { | ||||
|   key?: string; | ||||
|  | ||||
|   /** | ||||
|    * Returns all runners associated with this organisation (directly or indirectly via teams). | ||||
|    * Returns all runners associated with this organization (directly or indirectly via teams). | ||||
|    */ | ||||
|   public get allRunners(): Runner[] { | ||||
|     let returnRunners: Runner[] = new Array<Runner>(); | ||||
|   | ||||
| @@ -33,7 +33,7 @@ export class ResponseRunnerOrganisation extends ResponseRunnerGroup { | ||||
|     teams: RunnerTeam[]; | ||||
|  | ||||
|     /** | ||||
|      * The organisation's registration key. | ||||
|      * The organization's registration key. | ||||
|      * If registration is disabled this is null. | ||||
|      */ | ||||
|     @IsString() | ||||
| @@ -42,7 +42,7 @@ export class ResponseRunnerOrganisation extends ResponseRunnerGroup { | ||||
|     registrationKey?: string; | ||||
|  | ||||
|     /** | ||||
|      * Is registration enabled for the organisation? | ||||
|      * Is registration enabled for the organization? | ||||
|      */ | ||||
|     @IsOptional() | ||||
|     @IsBoolean() | ||||
|   | ||||
| @@ -9,7 +9,7 @@ import { ResponseRunnerOrganisation } from './ResponseRunnerOrganisation'; | ||||
| export class ResponseRunnerTeam extends ResponseRunnerGroup { | ||||
|  | ||||
|     /** | ||||
|      * The runnerTeam's parent group (organisation). | ||||
|      * The runnerTeam's parent group (organization). | ||||
|      */ | ||||
|     @IsObject() | ||||
|     @IsNotEmpty() | ||||
|   | ||||
| @@ -26,7 +26,7 @@ export class ResponseStats { | ||||
|     total_teams: number; | ||||
|  | ||||
|     /** | ||||
|      * The amount of organisations registered in the system. | ||||
|      * The amount of organizations registered in the system. | ||||
|      */ | ||||
|     @IsInt() | ||||
|     total_orgs: number; | ||||
|   | ||||
| @@ -35,8 +35,8 @@ export class ResponseStatsOrgnisation { | ||||
|     donationAmount: number; | ||||
|  | ||||
|     /** | ||||
|      * Creates a new organisation stats response from a organisation | ||||
|      * @param org The organisation whoes response shall be generated - the following relations have to be resolved: runners, runners.scans, runners.distanceDonations, runners.scans.track, teams, teams.runners, teams.runners.scans, teams.runners.distanceDonations, teams.runners.scans.track | ||||
|      * Creates a new organization stats response from a organization | ||||
|      * @param org The organization whoes response shall be generated - the following relations have to be resolved: runners, runners.scans, runners.distanceDonations, runners.scans.track, teams, teams.runners, teams.runners.scans, teams.runners.distanceDonations, teams.runners.scans.track | ||||
|      */ | ||||
|     public constructor(org: RunnerOrganisation) { | ||||
|         this.name = org.name; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user