filter-ts/dist/routes/route.js
2022-01-12 22:36:55 +01:00

20 lines
544 B
JavaScript

"use strict";
var BaseRoute = (function () {
function BaseRoute() {
this.title = "Tour of Heros";
this.scripts = [];
}
BaseRoute.prototype.addScript = function (src) {
this.scripts.push(src);
return this;
};
BaseRoute.prototype.render = function (req, res, view, options) {
res.locals.BASE_URL = "/";
res.locals.scripts = this.scripts;
res.locals.title = this.title;
res.render(view, options);
};
return BaseRoute;
}());
exports.BaseRoute = BaseRoute;