import {Request, Response} from "express"; import Controller from "../Controller.js"; export default class MailController extends Controller { public routes(): void { this.get("/mail/:template", this.getMail, 'mail'); } protected async getMail(request: Request, res: Response): Promise { const template = request.params['template']; res.formatViewData(`mails/${template}.mnjk`, request.query); } }