Rename source folders
All checks were successful
forgejo/Procyon/seedling/pipeline/head This commit looks good
All checks were successful
forgejo/Procyon/seedling/pipeline/head This commit looks good
This commit is contained in:
parent
2398a7c8c9
commit
da23b80647
23 changed files with 4 additions and 4 deletions
14
source/rest/src/common/health/health.controller.spec.ts
Normal file
14
source/rest/src/common/health/health.controller.spec.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
// @ts-nocheck
|
||||
import { HealthController } from './health.controller';
|
||||
|
||||
describe('AppController (e2e)', () => {
|
||||
let healthController: HealthController;
|
||||
|
||||
beforeEach(() => {
|
||||
healthController = new HealthController();
|
||||
});
|
||||
|
||||
it('should return OK response', async () => {
|
||||
expect(await healthController.status()).toEqual('OK');
|
||||
});
|
||||
});
|
21
source/rest/src/common/health/health.controller.ts
Normal file
21
source/rest/src/common/health/health.controller.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
// @ts-nocheck
|
||||
import { Controller, Get, Response } from '@nestjs/common';
|
||||
import { ApiResponse } from '@nestjs/swagger';
|
||||
|
||||
@Controller('health-check')
|
||||
export class HealthController {
|
||||
/**
|
||||
* Health check endpoint
|
||||
*/
|
||||
@ApiResponse({
|
||||
status: 200,
|
||||
description: 'API is online',
|
||||
schema: {
|
||||
default: 'OK',
|
||||
},
|
||||
})
|
||||
@Get()
|
||||
status() {
|
||||
return 'OK';
|
||||
}
|
||||
}
|
8
source/rest/src/common/health/health.module.ts
Normal file
8
source/rest/src/common/health/health.module.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
// @ts-nocheck
|
||||
import { Module } from '@nestjs/common';
|
||||
import { HealthController } from './health.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController],
|
||||
})
|
||||
export class HealthModule {}
|
Loading…
Add table
Add a link
Reference in a new issue