Little comment cleanup

ref #13
This commit is contained in:
2020-12-10 19:36:49 +01:00
parent f3000f14cd
commit 02877ece9c
6 changed files with 11 additions and 14 deletions

View File

@@ -20,16 +20,16 @@ export abstract class CreateRunnerGroup {
contact?: number;
/**
* Deals with the contact for groups this.
* Get's this group's contact from this.address.
*/
public async getContact(): Promise<GroupContact> {
if (this.contact === undefined) {
return null;
}
if (!isNaN(this.contact)) {
let address = await getConnectionManager().get().getRepository(GroupContact).findOne({ id: this.contact });
if (!address) { throw new GroupContactNotFoundError; }
return address;
let contact = await getConnectionManager().get().getRepository(GroupContact).findOne({ id: this.contact });
if (!contact) { throw new GroupContactNotFoundError; }
return contact;
}
throw new GroupContactWrongTypeError;