parent
dcb12b0ac2
commit
ccb7ae29a3
@ -57,12 +57,10 @@ export class RunnerSelfServiceController {
|
|||||||
@OnUndefined(RunnerNotFoundError)
|
@OnUndefined(RunnerNotFoundError)
|
||||||
@OpenAPI({ description: 'Deletes all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.' })
|
@OpenAPI({ description: 'Deletes all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.' })
|
||||||
async remove(@Param('jwt') token: string, @QueryParam("force") force: boolean) {
|
async remove(@Param('jwt') token: string, @QueryParam("force") force: boolean) {
|
||||||
let runner = await this.getRunner(token);
|
const responseRunner = await this.getRunner(token);
|
||||||
runner = await this.runnerRepository.findOne({ id: runner.id });
|
let runner = await this.runnerRepository.findOne({ id: responseRunner.id });
|
||||||
|
|
||||||
if (!runner) { return null; }
|
if (!runner) { return null; }
|
||||||
const responseRunner = await this.runnerRepository.findOne(runner, { relations: ['scans', 'group', 'group.parentGroup', 'scans.track', 'cards'] });
|
|
||||||
|
|
||||||
if (!runner) {
|
if (!runner) {
|
||||||
throw new RunnerNotFoundError();
|
throw new RunnerNotFoundError();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user