Now throwing errors
This commit is contained in:
parent
af1ad482d4
commit
77b769446f
@ -26,7 +26,7 @@ export class AuthController {
|
|||||||
try {
|
try {
|
||||||
auth = await createAuth.toAuth();
|
auth = await createAuth.toAuth();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
return auth
|
return auth
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ export class RunnerController {
|
|||||||
try {
|
try {
|
||||||
runner = await createRunner.toRunner();
|
runner = await createRunner.toRunner();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
runner = await this.runnerRepository.save(runner)
|
runner = await this.runnerRepository.save(runner)
|
||||||
|
@ -54,7 +54,7 @@ export class RunnerOrganisationController {
|
|||||||
try {
|
try {
|
||||||
runnerOrganisation = await createRunnerOrganisation.toRunnerOrganisation();
|
runnerOrganisation = await createRunnerOrganisation.toRunnerOrganisation();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
runnerOrganisation = await this.runnerOrganisationRepository.save(runnerOrganisation);
|
runnerOrganisation = await this.runnerOrganisationRepository.save(runnerOrganisation);
|
||||||
|
@ -53,7 +53,7 @@ export class RunnerTeamController {
|
|||||||
try {
|
try {
|
||||||
runnerTeam = await createRunnerTeam.toRunnerTeam();
|
runnerTeam = await createRunnerTeam.toRunnerTeam();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
runnerTeam = await this.runnerTeamRepository.save(runnerTeam);
|
runnerTeam = await this.runnerTeamRepository.save(runnerTeam);
|
||||||
|
@ -44,7 +44,7 @@ export class UserController {
|
|||||||
try {
|
try {
|
||||||
user = await createUser.toUser();
|
user = await createUser.toUser();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.userRepository.save(user);
|
return this.userRepository.save(user);
|
||||||
|
@ -43,7 +43,7 @@ export class UserGroupController {
|
|||||||
try {
|
try {
|
||||||
userGroup = await createUserGroup.toUserGroup();
|
userGroup = await createUserGroup.toUserGroup();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.userGroupsRepository.save(userGroup);
|
return this.userGroupsRepository.save(userGroup);
|
||||||
|
@ -35,11 +35,7 @@ export class CreateRunnerTeam extends CreateRunnerGroup {
|
|||||||
let newRunnerTeam: RunnerTeam = new RunnerTeam();
|
let newRunnerTeam: RunnerTeam = new RunnerTeam();
|
||||||
|
|
||||||
newRunnerTeam.name = this.name;
|
newRunnerTeam.name = this.name;
|
||||||
try {
|
newRunnerTeam.parentGroup = await this.getParent();
|
||||||
newRunnerTeam.parentGroup = await this.getParent();
|
|
||||||
} catch (error) {
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
newRunnerTeam.contact = await this.getContact()
|
newRunnerTeam.contact = await this.getContact()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user