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

View File

@ -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(); }