18 lines
459 B
JavaScript
18 lines
459 B
JavaScript
module.exports = function(qwiki) {
|
|
// **** SEARCH
|
|
qwiki.rule('search', '@@CONTENT@@', function(req, res, instance, next) {
|
|
if ('submit' in req.fields) {
|
|
if ('search' in req.fields) {
|
|
res.write('Results for: ' + req.fields['search']);
|
|
}
|
|
}
|
|
next();
|
|
});
|
|
qwiki.act('search', function(req, res) {
|
|
res.writeHead(200, "OK", {
|
|
"Content-Type": "text/html",
|
|
});
|
|
qwiki.parsePage('search', '', req, res);
|
|
});
|
|
};
|