@mdf.js/service-registry
Version:
MMS - API - Service Registry
35 lines • 1.03 kB
JavaScript
;
/**
* Copyright 2024 Mytra Control S.L. All rights reserved.
*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
* or at https://opensource.org/licenses/MIT.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Controller = void 0;
/** Controller class */
class Controller {
/**
* Create an instance of Controller class
* @param service - service instance
*/
constructor(service) {
this.service = service;
}
/**
* Return the state of all the providers
* @param request - HTTP request express object
* @param response - HTTP response express object
* @param next - Next express middleware function
*/
health(request, response, next) {
this.service
.health()
.then(result => {
response.status(200).json(result);
})
.catch(next);
}
}
exports.Controller = Controller;
//# sourceMappingURL=health.controller.js.map