Cleaned up realations regarding response classes
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
ref #132
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { IsInt, IsNotEmpty, IsObject, IsOptional, IsString } from "class-validator";
|
||||
import { GroupContact } from '../entities/GroupContact';
|
||||
import { RunnerGroup } from '../entities/RunnerGroup';
|
||||
import { ResponseObjectType } from '../enums/ResponseObjectType';
|
||||
import { IResponse } from './IResponse';
|
||||
import { ResponseGroupContact } from './ResponseGroupContact';
|
||||
|
||||
/**
|
||||
* Defines the runnerGroup response.
|
||||
@@ -34,7 +34,7 @@ export abstract class ResponseRunnerGroup implements IResponse {
|
||||
*/
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
contact?: GroupContact;
|
||||
contact?: ResponseGroupContact;
|
||||
|
||||
/**
|
||||
* Creates a ResponseRunnerGroup object from a runnerGroup.
|
||||
@@ -43,6 +43,6 @@ export abstract class ResponseRunnerGroup implements IResponse {
|
||||
public constructor(group: RunnerGroup) {
|
||||
this.id = group.id;
|
||||
this.name = group.name;
|
||||
this.contact = group.contact;
|
||||
if (group.contact) { this.contact = group.contact.toResponse(); };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user