Release 0.1.1 #13

Merged
niggl merged 29 commits from dev into main 2021-03-31 17:49:06 +00:00
Showing only changes of commit 9807e61fa8 - Show all commits

View File

@ -62,4 +62,20 @@ export class MailController {
} }
return new SuccessResponse(locale); return new SuccessResponse(locale);
} }
@Post('/registration_forgot')
@OpenAPI({ description: "Sends selfservice link forgotten mails", parameters: [{ in: "query", name: "locale", schema: { type: "string", enum: ["de", "en"] } }] })
async sendSelfserviceForgotten(@Body({ validate: true }) mailOptions: WelcomeMail, @QueryParam("locale") locale: locales) {
if (!this.initialized) {
await this.mailer.init();
this.initialized = true;
}
try {
this.mailer.sendSelfserviceForgottenMail(mailOptions.address, mailOptions.selfserviceToken, locale?.toString())
} catch (error) {
console.log(error)
throw error;
}
return new SuccessResponse(locale);
}
} }