feat(FN-4029): expose database health in API and store contracts
Adds database health endpoints to the API layer (FN-4029), exposing a new store health accessor through `api-node.ts` and `api/legacy.ts`, with aligned auth middleware integration tests and updated architecture documentation. Fusion-Task-Id: FN-4029
This commit is contained in:
@@ -6977,14 +6977,14 @@ ${stepsSection}`;
|
||||
}
|
||||
|
||||
getDatabaseHealth(): {
|
||||
corruptionDetected: boolean;
|
||||
integrityCheckPending: boolean;
|
||||
integrityCheckLastRunAt: string | null;
|
||||
healthy: boolean;
|
||||
lastCheckedAt: Date | null;
|
||||
isRunning: boolean;
|
||||
} {
|
||||
return {
|
||||
corruptionDetected: this.db.corruptionDetected,
|
||||
integrityCheckPending: this.db.integrityCheckPending,
|
||||
integrityCheckLastRunAt: this.db.integrityCheckLastRunAt,
|
||||
healthy: !this.db.corruptionDetected,
|
||||
lastCheckedAt: this.db.integrityCheckLastRunAt ? new Date(this.db.integrityCheckLastRunAt) : null,
|
||||
isRunning: this.db.integrityCheckPending,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user