All Downloads are FREE. Search and download functionalities are using the official Maven repository.

handlebars.nodejs.controller.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
'use strict';

var utils = require('../utils/writer.js');
{{#operations}}
var {{classname}} = require('../{{implFolder}}/{{classname}}Service');
{{#operation}}
{{#contents}}

module.exports.{{nickname}} = function {{nickname}} (req, res, next{{#parameters}}{{#@first}}, {{/@first}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) {
  {{classname}}.{{nickname}}({{#parameters}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}})
    .then(function (response) {
      utils.writeJson(res, response);
    })
    .catch(function (response) {
      utils.writeJson(res, response);
    });
};
{{/contents}}
{{/operation}}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy