@sourceloop/ctrl-plane-orchestrator-service
Version:
ARC SaaS Orchestrator service.
35 lines • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PingController = void 0;
const tslib_1 = require("tslib");
const core_1 = require("@loopback/core");
const rest_1 = require("@loopback/rest");
/**
* A simple controller to bounce back http requests
*/
let PingController = class PingController {
constructor(req) {
this.req = req;
}
ping() {
// Reply with a greeting, the current time, the url, and request headers
return {
greeting: 'Hello from Orchestrator Service.',
date: new Date(),
url: this.req.url,
headers: { ...this.req.headers },
};
}
};
exports.PingController = PingController;
tslib_1.__decorate([
(0, rest_1.get)('/ping'),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", []),
tslib_1.__metadata("design:returntype", Object)
], PingController.prototype, "ping", null);
exports.PingController = PingController = tslib_1.__decorate([
tslib_1.__param(0, (0, core_1.inject)(rest_1.RestBindings.Http.REQUEST)),
tslib_1.__metadata("design:paramtypes", [Object])
], PingController);
//# sourceMappingURL=ping.controller.js.map