File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type EngineFeature =
1313 | "HETEROGENEOUS_WALLET_TYPES"
1414 | "SMART_BACKEND_WALLETS" ;
1515
16- const ReplySchemaOk = Type . Object ( {
16+ const ReplySchema = Type . Object ( {
1717 db : Type . Boolean ( ) ,
1818 redis : Type . Boolean ( ) ,
1919 auth : Type . Boolean ( ) ,
@@ -31,15 +31,9 @@ const ReplySchemaOk = Type.Object({
3131 clientId : Type . String ( ) ,
3232} ) ;
3333
34- const ReplySchemaError = Type . Object ( {
35- error : Type . String ( ) ,
36- } ) ;
37-
38- const responseBodySchema = Type . Union ( [ ReplySchemaOk , ReplySchemaError ] ) ;
39-
4034export async function healthCheck ( fastify : FastifyInstance ) {
4135 fastify . route < {
42- Reply : Static < typeof responseBodySchema > ;
36+ Reply : Static < typeof ReplySchema > ;
4337 } > ( {
4438 method : "GET" ,
4539 url : "/system/health" ,
@@ -50,8 +44,8 @@ export async function healthCheck(fastify: FastifyInstance) {
5044 tags : [ "System" ] ,
5145 operationId : "checkHealth" ,
5246 response : {
53- [ StatusCodes . OK ] : ReplySchemaOk ,
54- [ StatusCodes . SERVICE_UNAVAILABLE ] : ReplySchemaError ,
47+ [ StatusCodes . OK ] : ReplySchema ,
48+ [ StatusCodes . SERVICE_UNAVAILABLE ] : ReplySchema ,
5549 } ,
5650 } ,
5751 handler : async ( _ , res ) => {
You can’t perform that action at this time.
0 commit comments