@@ -62,4 +62,20 @@ export class MailController {
 | 
			
		||||
        }
 | 
			
		||||
        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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user