Now with cleaner participants in the responses

ref #6
This commit is contained in:
2020-12-18 15:26:54 +01:00
parent dc485c02ea
commit 145a08b1b4
5 changed files with 63 additions and 3 deletions
+6
View File
@@ -4,6 +4,8 @@ import {
IsString
} from "class-validator";
import { ChildEntity, Column } from "typeorm";
import { ResponsePrincipal } from '../responses/ResponsePrincipal';
import { ResponseUserGroup } from '../responses/ResponseUserGroup';
import { Principal } from './Principal';
/**
@@ -27,4 +29,8 @@ export class UserGroup extends Principal {
@IsOptional()
@IsString()
description?: string;
public toResponse(): ResponsePrincipal {
return new ResponseUserGroup(this);
}
}