Removed (now useless) mail controller

ref #151
This commit is contained in:
Nicolai Ort 2021-03-04 16:11:21 +01:00
parent ddea02db57
commit 485c247cd3
1 changed files with 0 additions and 26 deletions

View File

@ -1,26 +0,0 @@
import { Authorized, JsonController, Post } from 'routing-controllers';
import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi';
import { config } from '../config';
import { Mailer } from '../mailer';
import { ResponseEmpty } from '../models/responses/ResponseEmpty';
@JsonController('/mails')
@OpenAPI({ security: [{ "AuthToken": [] }, { "RefreshTokenCookie": [] }] })
export class MailController {
private mailer: Mailer;
constructor() {
this.mailer = new Mailer();
}
@Post('/test')
@Authorized(["MAIL:CREATE"])
@ResponseSchema(ResponseEmpty, { statusCode: 200 })
@OpenAPI({ description: 'Sends a test email to the configured from-address.' })
async get() {
await this.mailer.sendTestMail(config.mail_from);
return new ResponseEmpty();
}
}