Changed endpoint url to avoid conflicts

ref #154
This commit is contained in:
Nicolai Ort 2021-03-06 13:56:34 +01:00
parent c01233b4d6
commit e5dab3469c
1 changed files with 4 additions and 1 deletions

View File

@ -56,11 +56,14 @@ export class RunnerSelfServiceController {
return responseScans;
}
@Post('/runners/me/forgot')
@Post('/runners/forgot')
@ResponseSchema(RunnerNotFoundError, { statusCode: 404 })
@OnUndefined(ResponseEmpty)
@OpenAPI({ description: 'TODO' })
async requestNewToken(@QueryParam('mail') mail: string) {
if (!mail) {
throw new RunnerNotFoundError();
}
const runner = await this.runnerRepository.findOne({ email: mail });
if (!runner) { throw new RunnerNotFoundError(); }