mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-19 18:49:43 +02:00
deprecating loadServer in favour of using res.render
This commit is contained in:
@@ -64,6 +64,8 @@
|
||||
|
||||
function loadTemplates(templatesToLoad, customTemplateDir) {
|
||||
function loadServer() {
|
||||
return templates.ready();
|
||||
|
||||
var loaded = templatesToLoad.length,
|
||||
templatesPath = __dirname + '/../templates';
|
||||
|
||||
@@ -140,8 +142,7 @@
|
||||
|
||||
if (!templates[tpl]) {
|
||||
fs.readFile(filename, function (err, html) {
|
||||
templates[tpl] = html.toString();
|
||||
templates.prepare(templates[tpl]);
|
||||
templates[tpl] = templates.prepare(html.toString());
|
||||
|
||||
return fn(err, templates[tpl].parse(options));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user