|
@@ -12,10 +12,15 @@ module.exports = function(crowi, app) {
|
|
|
var api = actions.api = {};
|
|
var api = actions.api = {};
|
|
|
|
|
|
|
|
actions.searchPage = function(req, res) {
|
|
actions.searchPage = function(req, res) {
|
|
|
|
|
+ var keyword = req.query.q || null;
|
|
|
var search = crowi.getSearcher();
|
|
var search = crowi.getSearcher();
|
|
|
if (!search) {
|
|
if (!search) {
|
|
|
return res.json(ApiResponse.error('Configuration of ELASTICSEARCH_URI is required.'));
|
|
return res.json(ApiResponse.error('Configuration of ELASTICSEARCH_URI is required.'));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ return res.render('search', {
|
|
|
|
|
+ q: keyword,
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
/**
|