first commit
This commit is contained in:
11
apps/api/dist/health/health.controller.d.ts
vendored
Normal file
11
apps/api/dist/health/health.controller.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
export declare class HealthController {
|
||||
private readonly prisma;
|
||||
constructor(prisma: PrismaService);
|
||||
ok(): {
|
||||
status: string;
|
||||
};
|
||||
db(): Promise<{
|
||||
db: string;
|
||||
}>;
|
||||
}
|
||||
45
apps/api/dist/health/health.controller.js
vendored
Normal file
45
apps/api/dist/health/health.controller.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HealthController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../prisma/prisma.service");
|
||||
let HealthController = class HealthController {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
ok() {
|
||||
return { status: 'ok' };
|
||||
}
|
||||
async db() {
|
||||
await this.prisma.$queryRaw `SELECT 1`;
|
||||
return { db: 'connected' };
|
||||
}
|
||||
};
|
||||
exports.HealthController = HealthController;
|
||||
__decorate([
|
||||
(0, common_1.Get)(),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", void 0)
|
||||
], HealthController.prototype, "ok", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('db'),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], HealthController.prototype, "db", null);
|
||||
exports.HealthController = HealthController = __decorate([
|
||||
(0, common_1.Controller)('health'),
|
||||
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
|
||||
], HealthController);
|
||||
//# sourceMappingURL=health.controller.js.map
|
||||
1
apps/api/dist/health/health.controller.js.map
vendored
Normal file
1
apps/api/dist/health/health.controller.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6DAAyD;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAGtD,EAAE;QACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;IAGK,AAAN,KAAK,CAAC,EAAE;QAEN,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA,UAAU,CAAC;QACtC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;CACF,CAAA;AAdY,4CAAgB;AAI3B;IADC,IAAA,YAAG,GAAE;;;;0CAGL;AAGK;IADL,IAAA,YAAG,EAAC,IAAI,CAAC;;;;0CAKT;2BAbU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAEkB,8BAAa;GADvC,gBAAgB,CAc5B"}
|
||||
Reference in New Issue
Block a user