nodejs приложение, которое я разрабатываю я использую чванство и машинописный на мой контроллер выглядит какконтроллер NodeJs Кураж Машинопись не найден
const q_mapping = require('../../config/q_mapping');
import { amqpMessenger } from '../tools/amqp';
const survey = {
surveyServiceCheck : (req,res) =>{
amqpMessenger({serviceCheck : true},res, q_mapping.survey);
}
}
export {survey}
и чванство жалуются
не удается разрешить сконфигурированной обработчик чванство-маршрутизатор: survey_surveyServiceCheck
, когда я вижу сгенерированный JS файл, он экспортировать что-то вроде что
"use strict";
var q_mapping = require('../../config/q_mapping');
var amqp_1 = require("../tools/amqp");
var survey = (function() {
function survey() {
}
survey.prototype.surveyServiceCheck = function (req, res) {
amqp_1.amqpMessenger({ serviceCheck: true }, res, q_mapping.survey);
};
return survey;
}());
exports.survey = survey;
и когда я menually изменится на exports.survey = survey;
линии, чтобы module.exports = survey;
чванство попадает в контроллер.
Что мне нужно изменить на моем машинописном тексте, чтобы сгенерировать выше, или я сделал что-то неправильно, когда я пишу контроллер? мое определение чванство как
/survey:
# binds a127 app logic to a route
x-swagger-router-controller: survey
get:
description: Check whether the survey service is up or not
# used as the method name of the controller
operationId: surveyServiceCheck
responses:
"200":
description: Success
schema:
# a pointer to a definition
$ref: "#/definitions/defaultResponse"
# responses may fall through to errors
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"