Second part of the action comment refactoring
Some checks failed
continuous-integration/drone/pr Build is failing

ref #39
This commit is contained in:
2020-12-21 16:21:12 +01:00
parent 1d0d79f3da
commit 48bef8db60
12 changed files with 79 additions and 49 deletions

View File

@@ -5,18 +5,20 @@ import { Address } from '../entities/Address';
import { RunnerOrganisation } from '../entities/RunnerOrganisation';
import { CreateRunnerGroup } from './CreateRunnerGroup';
/**
* This classed is used to create a new RunnerOrganisation entity from a json body (post request).
*/
export class CreateRunnerOrganisation extends CreateRunnerGroup {
/**
* The new organisation's address.
* Must be of type number (address id).
* Optional.
*/
@IsInt()
@IsOptional()
address?: number;
/**
* Get's this org's address from this.address.
* Gets the org's address by it's id.
*/
public async getAddress(): Promise<Address> {
if (this.address === undefined || this.address === null) {
@@ -32,7 +34,7 @@ export class CreateRunnerOrganisation extends CreateRunnerGroup {
}
/**
* Creates a RunnerOrganisation entity from this.
* Creates a new RunnerOrganisation entity from this.
*/
public async toRunnerOrganisation(): Promise<RunnerOrganisation> {
let newRunnerOrganisation: RunnerOrganisation = new RunnerOrganisation();