Now throwing errors

This commit is contained in:
Nicolai Ort 2020-12-09 18:59:01 +01:00
parent af1ad482d4
commit 77b769446f
7 changed files with 7 additions and 11 deletions

View File

@ -26,7 +26,7 @@ export class AuthController {
try {
auth = await createAuth.toAuth();
} catch (error) {
return error;
throw error;
}
return auth
}

View File

@ -54,7 +54,7 @@ export class RunnerController {
try {
runner = await createRunner.toRunner();
} catch (error) {
return error;
throw error;
}
runner = await this.runnerRepository.save(runner)

View File

@ -54,7 +54,7 @@ export class RunnerOrganisationController {
try {
runnerOrganisation = await createRunnerOrganisation.toRunnerOrganisation();
} catch (error) {
return error;
throw error;
}
runnerOrganisation = await this.runnerOrganisationRepository.save(runnerOrganisation);

View File

@ -53,7 +53,7 @@ export class RunnerTeamController {
try {
runnerTeam = await createRunnerTeam.toRunnerTeam();
} catch (error) {
return error;
throw error;
}
runnerTeam = await this.runnerTeamRepository.save(runnerTeam);

View File

@ -44,7 +44,7 @@ export class UserController {
try {
user = await createUser.toUser();
} catch (error) {
return error;
throw error;
}
return this.userRepository.save(user);

View File

@ -43,7 +43,7 @@ export class UserGroupController {
try {
userGroup = await createUserGroup.toUserGroup();
} catch (error) {
return error;
throw error;
}
return this.userGroupsRepository.save(userGroup);

View File

@ -35,11 +35,7 @@ export class CreateRunnerTeam extends CreateRunnerGroup {
let newRunnerTeam: RunnerTeam = new RunnerTeam();
newRunnerTeam.name = this.name;
try {
newRunnerTeam.parentGroup = await this.getParent();
} catch (error) {
throw error;
}
newRunnerTeam.parentGroup = await this.getParent();
newRunnerTeam.contact = await this.getContact()