瀏覽代碼

docs(core): Fix docs for TypeORMHealthCheckStrategy

Closes #2730
Michael Bromley 1 年之前
父節點
當前提交
49456b54ef

+ 9 - 7
docs/docs/reference/typescript-api/health-check/type-ormhealth-check-strategy.md

@@ -11,7 +11,7 @@ import MemberDescription from '@site/src/components/MemberDescription';
 
 ## TypeORMHealthCheckStrategy
 
-<GenerationInfo sourceFile="packages/core/src/health-check/typeorm-health-check-strategy.ts" sourceLine="36" packageName="@vendure/core" />
+<GenerationInfo sourceFile="packages/core/src/health-check/typeorm-health-check-strategy.ts" sourceLine="38" packageName="@vendure/core" />
 
 A <a href='/reference/typescript-api/health-check/health-check-strategy#healthcheckstrategy'>HealthCheckStrategy</a> used to check the health of the database. This health
 check is included by default, but can be customized by explicitly adding it to the
@@ -24,12 +24,14 @@ import { TypeORMHealthCheckStrategy } from '@vendure/core';
 
 export const config = {
   // ...
-  systemOptions: [
-    // The default key is "database" and the default timeout is 1000ms
-    // Sometimes this is too short and leads to false negatives in the
-    // /health endpoint.
-    new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }),
-  ]
+  systemOptions: {
+    healthChecks:[
+        // The default key is "database" and the default timeout is 1000ms
+        // Sometimes this is too short and leads to false negatives in the
+        // /health endpoint.
+        new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }),
+    ]
+  }
 }
 ```
 

+ 8 - 6
packages/core/src/health-check/typeorm-health-check-strategy.ts

@@ -22,12 +22,14 @@ export interface TypeORMHealthCheckOptions {
  *
  * export const config = {
  *   // ...
- *   systemOptions: [
- *     // The default key is "database" and the default timeout is 1000ms
- *     // Sometimes this is too short and leads to false negatives in the
- *     // /health endpoint.
- *     new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }),
- *   ]
+ *   systemOptions: {
+ *     healthChecks:[
+ *         // The default key is "database" and the default timeout is 1000ms
+ *         // Sometimes this is too short and leads to false negatives in the
+ *         // /health endpoint.
+ *         new TypeORMHealthCheckStrategy({ key: 'postgres-db', timeout: 5000 }),
+ *     ]
+ *   }
  * }
  * ```
  *