"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HealthcheckController = void 0;
const tslib_1 = require("tslib");
const http_1 = require("@deepkit/http");
const helpers_1 = require("../helpers");
const healthcheck_service_1 = require("./healthcheck.service");
let HealthcheckController = class HealthcheckController {
    constructor(healthcheckService) {
        this.healthcheckService = healthcheckService;
        this.appVersion = (0, helpers_1.getPackageVersion)() ?? 'unknown';
    }
    async index() {
        await this.healthcheckService.check();
        return { version: this.appVersion };
    }
};
exports.HealthcheckController = HealthcheckController;
HealthcheckController.__type = ['appVersion', function () { return (0, helpers_1.getPackageVersion)() ?? 'unknown'; }, () => healthcheck_service_1.HealthcheckService, 'healthcheckService', 'constructor', 'version', 'index', 'HealthcheckController', '!3!;>"PP7#2$;"0%PP&4&M`0\'5w('];
tslib_1.__decorate([
    http_1.http.GET(),
    tslib_1.__metadata("design:type", Function),
    tslib_1.__metadata("design:paramtypes", []),
    tslib_1.__metadata("design:returntype", Promise)
], HealthcheckController.prototype, "index", null);
exports.HealthcheckController = HealthcheckController = tslib_1.__decorate([
    http_1.http.controller('/healthz'),
    tslib_1.__metadata("design:paramtypes", [healthcheck_service_1.HealthcheckService])
], HealthcheckController);
//# sourceMappingURL=healthcheck.controller.js.map