mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
templates refactor part 2
updated so that tpls get loaded on demand as opposed to all at once on load; added a function to pull the tpl list on load instead of having to manually define new templates in code; some clean up; added utils.walk;
This commit is contained in:
@@ -108,6 +108,11 @@ var express = require('express'),
|
||||
function api_method(req, res) {
|
||||
|
||||
switch(req.params.method) {
|
||||
case 'get_templates_listing' :
|
||||
utils.walk(global.configuration.ROOT_DIRECTORY + '/public/templates', function(err, data) {
|
||||
res.send(JSON.stringify(data));
|
||||
});
|
||||
break;
|
||||
case 'home' :
|
||||
categories.get(function(data) {
|
||||
res.send(JSON.stringify(data));
|
||||
|
||||
Reference in New Issue
Block a user