Renamed files and classed from *Organisation* to *Organization*📝
ref #117
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { IsInt, IsNotEmpty } 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 './CreateRunnerGroup';
|
||||
|
||||
@@ -21,12 +21,12 @@ export class CreateRunnerTeam extends CreateRunnerGroup {
|
||||
/**
|
||||
* Gets the new team's parent org 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user