mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
feat(react/settings): port integrity check
This commit is contained in:
@@ -9,6 +9,7 @@ import type { Request } from "express";
|
||||
import ValidationError from "../../errors/validation_error.js";
|
||||
import sql_init from "../../services/sql_init.js";
|
||||
import becca_loader from "../../becca/becca_loader.js";
|
||||
import { DatabaseCheckIntegrityResponse } from "@triliumnext/commons";
|
||||
|
||||
function getExistingBackups() {
|
||||
return backupService.getExistingBackups();
|
||||
@@ -48,13 +49,13 @@ async function anonymize(req: Request) {
|
||||
}
|
||||
|
||||
function checkIntegrity() {
|
||||
const results = sql.getRows("PRAGMA integrity_check");
|
||||
const results = sql.getRows<{ integrity_check: string }>("PRAGMA integrity_check");
|
||||
|
||||
log.info(`Integrity check result: ${JSON.stringify(results)}`);
|
||||
|
||||
return {
|
||||
results
|
||||
};
|
||||
} satisfies DatabaseCheckIntegrityResponse;
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user