Release v0.6.0 #159

Merged
niggl merged 43 commits from dev into main 2021-03-17 17:58:21 +00:00
Showing only changes of commit e7f0cb45c9 - Show all commits

View File

@ -55,12 +55,13 @@ export class RunnerSelfServiceController {
}
@Post('/runners/me/forgot')
@ResponseSchema(ResponseSelfServiceRunner, { isArray: true })
@ResponseSchema(RunnerNotFoundError, { statusCode: 404 })
@OnUndefined(ResponseEmpty)
@OpenAPI({ description: 'TODO' })
async requestNewToken(@QueryParam('mail') mail: string) {
const runner = await this.runnerRepository.findOne({ email: mail });
if (!runner) { throw new RunnerNotFoundError(); }
if (runner.resetRequestedTimestamp > (Math.floor(Date.now() / 1000) - 60 * 60 * 24)) { throw new Error("timeout!") }
const token = JwtCreator.createSelfService(runner);