diff --git a/apps/api/src/app/health/health.controller.ts b/apps/api/src/app/health/health.controller.ts index 4f88a03f0c..1f1ecb9902 100644 --- a/apps/api/src/app/health/health.controller.ts +++ b/apps/api/src/app/health/health.controller.ts @@ -3,7 +3,8 @@ import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interce import { AiServiceHealthResponse, DataEnhancerHealthResponse, - DataProviderHealthResponse + DataProviderHealthResponse, + LivenessHealthResponse } from '@ghostfolio/common/interfaces'; import { @@ -116,4 +117,9 @@ export class HealthController { .json({ status: getReasonPhrase(StatusCodes.SERVICE_UNAVAILABLE) }); } } + + @Get('liveness') + public getLiveness(): LivenessHealthResponse { + return { status: getReasonPhrase(StatusCodes.OK) }; + } } diff --git a/libs/common/src/lib/interfaces/index.ts b/libs/common/src/lib/interfaces/index.ts index c581b8e56e..113e485b74 100644 --- a/libs/common/src/lib/interfaces/index.ts +++ b/libs/common/src/lib/interfaces/index.ts @@ -68,6 +68,7 @@ import type { ExportResponse } from './responses/export-response.interface'; import type { HistoricalResponse } from './responses/historical-response.interface'; import type { ImportResponse } from './responses/import-response.interface'; import type { InfoResponse } from './responses/info-response.interface'; +import type { LivenessHealthResponse } from './responses/liveness-health-response.interface'; import type { LookupResponse } from './responses/lookup-response.interface'; import type { MarketDataOfMarketsResponse } from './responses/market-data-of-markets-response.interface'; import type { OAuthResponse } from './responses/oauth-response.interface'; @@ -156,6 +157,7 @@ export { InfoResponse, InvestmentItem, LineChartItem, + LivenessHealthResponse, LookupItem, LookupResponse, MarketData, diff --git a/libs/common/src/lib/interfaces/responses/liveness-health-response.interface.ts b/libs/common/src/lib/interfaces/responses/liveness-health-response.interface.ts new file mode 100644 index 0000000000..28db1fb5b3 --- /dev/null +++ b/libs/common/src/lib/interfaces/responses/liveness-health-response.interface.ts @@ -0,0 +1,3 @@ +export interface LivenessHealthResponse { + status: string; +}