tbl/src/app.controller.ts
Application http controller
Methods |
getHealthCheck |
getHealthCheck()
|
Decorators :
@Get('api/health-check')
|
Defined in tbl/src/app.controller.ts:13
|
health check route
Returns :
string
|
catchAndRespondWithError | ||||
catchAndRespondWithError(error)
|
||||
Inherited from
ApiResponse
|
||||
Defined in
ApiResponse:64
|
||||
Error response method with additional trace details about error @param message {any} - error message @param code {any} - error code @return {AbstractApiReply} - error reply object
Parameters :
Returns :
literal type
|
responseError | |||||||||
responseError(message, code)
|
|||||||||
Inherited from
ApiResponse
|
|||||||||
Defined in
ApiResponse:37
|
|||||||||
Error response method @param message {any} - error message @param code {any} - error code @return {AbstractApiReply} - error reply object
Parameters :
Returns :
literal type
|
responseSuccess | ||||||||
responseSuccess(data: TResponse)
|
||||||||
Inherited from
ApiResponse
|
||||||||
Defined in
ApiResponse:17
|
||||||||
Type parameters :
|
||||||||
Success response method @param data {any} - reply data @return {AbstractApiReply} - success reply object
Parameters :
Returns :
literal type
|
responseSuccessOnly |
responseSuccessOnly()
|
Inherited from
ApiResponse
|
Defined in
ApiResponse:95
|
Simplest success response without any data method @return {AbstractApiReply} - success reply object
Returns :
literal type
|
import { Controller, Get } from '@nestjs/common';
import { ApiResponse } from '../../shared/common/api-response';
/**
* Application http controller
*/
@Controller()
export class AppController extends ApiResponse {
/**
* health check route
*/
@Get('api/health-check')
getHealthCheck(): string {
return 'OK';
}
}