ily.li/src/controllers/HomeController.ts

17 lines
458 B
TypeScript
Raw Normal View History

2020-04-23 18:07:55 +02:00
import Controller from "wms-core/Controller";
import {Request, Response} from "express";
export default class HomeController extends Controller {
routes(): void {
this.get('/', this.getHome, 'home');
this.get('/about', this.getAbout, 'about');
}
private async getHome(req: Request, res: Response) {
res.render('home');
}
private async getAbout(req: Request, res: Response) {
res.render('about');
}
}