Added a contact response class

ref #104
This commit is contained in:
2021-01-19 16:02:13 +01:00
parent d12801e34d
commit 1407fe36f3
2 changed files with 70 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import {
} from "class-validator";
import { Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { config } from '../../config';
import { ResponseGroupContact } from '../responses/ResponseGroupContact';
import { Address } from "./Address";
import { IAddressUser } from './IAddressUser';
import { RunnerGroup } from "./RunnerGroup";
@@ -85,7 +86,7 @@ export class GroupContact implements IAddressUser {
/**
* Turns this entity into it's response class.
*/
public toResponse() {
return new Error("NotImplemented");
public toResponse(): ResponseGroupContact {
return new ResponseGroupContact(this);
}
}