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

nodejs.controller.mustache Maven / Gradle / Ivy

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

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

module.exports.{{nickname}} = function {{nickname}} (req, res, next) {
  {{#allParams}}
  var {{paramName}} = req.swagger.params['{{baseName}}'].value;
  {{/allParams}}
  {{classname}}.{{nickname}}({{#allParams}}{{paramName}}{{#hasMore}},{{/hasMore}}{{/allParams}})
    .then(function (response) {
      utils.writeJson(res, response);
    })
    .catch(function (response) {
      utils.writeJson(res, response);
    });
};
{{/operation}}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy