parent
c01233b4d6
commit
e5dab3469c
@ -56,11 +56,14 @@ export class RunnerSelfServiceController {
|
|||||||
return responseScans;
|
return responseScans;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('/runners/me/forgot')
|
@Post('/runners/forgot')
|
||||||
@ResponseSchema(RunnerNotFoundError, { statusCode: 404 })
|
@ResponseSchema(RunnerNotFoundError, { statusCode: 404 })
|
||||||
@OnUndefined(ResponseEmpty)
|
@OnUndefined(ResponseEmpty)
|
||||||
@OpenAPI({ description: 'TODO' })
|
@OpenAPI({ description: 'TODO' })
|
||||||
async requestNewToken(@QueryParam('mail') mail: string) {
|
async requestNewToken(@QueryParam('mail') mail: string) {
|
||||||
|
if (!mail) {
|
||||||
|
throw new RunnerNotFoundError();
|
||||||
|
}
|
||||||
const runner = await this.runnerRepository.findOne({ email: mail });
|
const runner = await this.runnerRepository.findOne({ email: mail });
|
||||||
if (!runner) { throw new RunnerNotFoundError(); }
|
if (!runner) { throw new RunnerNotFoundError(); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user