|
@@ -1180,12 +1180,7 @@ module.exports = function(crowi, app) {
|
|
|
* @apiParam {String} path
|
|
* @apiParam {String} path
|
|
|
*/
|
|
*/
|
|
|
api.templates = function(req, res) {
|
|
api.templates = function(req, res) {
|
|
|
- const pagePath = req.query.path || null;
|
|
|
|
|
-
|
|
|
|
|
- if (!pagePath) {
|
|
|
|
|
- return res.json(ApiResponse.error(new Error('Parameter path is required.')));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const pagePath = req.query.path;
|
|
|
const templateFinder = Page.checkIfTemplatesExist(pagePath);
|
|
const templateFinder = Page.checkIfTemplatesExist(pagePath);
|
|
|
|
|
|
|
|
templateFinder.then(function(templateInfo) {
|
|
templateFinder.then(function(templateInfo) {
|