refactor(RunnerController.remove): only load necessary relations
This commit is contained in:
parent
c0d5af5d7a
commit
8c6fdb2239
@ -132,7 +132,7 @@ export class RunnerController {
|
||||
async remove(@Param("id") id: number, @QueryParam("force") force: boolean) {
|
||||
let runner = await this.runnerRepository.findOne({ id: id });
|
||||
if (!runner) { return null; }
|
||||
const responseRunner = await this.runnerRepository.findOne(runner, { relations: ['scans', 'group', 'group.parentGroup', 'scans.track', 'cards'] });
|
||||
const responseRunner = await this.runnerRepository.findOne(runner);
|
||||
|
||||
if (!runner) {
|
||||
throw new RunnerNotFoundError();
|
||||
|
Loading…
x
Reference in New Issue
Block a user