search and reset routes, the very last of the views to be refactored :shipit:

This commit is contained in:
psychobunny
2014-03-03 17:16:53 -05:00
parent 8802fc5a33
commit c24c2a5422
3 changed files with 40 additions and 59 deletions

View File

@@ -88,6 +88,34 @@ Controllers.home = function(req, res, next) {
});
};
Controllers.search = function(req, res, next) {
var data = {
show_no_topics: 'hide',
show_no_posts: 'hide',
show_results: 'hide',
search_query: '',
posts: [],
topics: []
};
if (res.locals.isAPI) {
res.json(data);
} else {
res.render('search', data);
}
};
Controllers.reset = function(req, res, next) {
var data = {
reset_code: req.params.code ? req.params.code : null
}
if (res.locals.isAPI) {
res.json(data);
} else {
res.render('reset', data);
}
};
Controllers.login = function(req, res, next) {
var data = {},