Checkpoint: Ajout du bouton "Effacer les logs" dans la page Historique d'import avec confirmation de suppression.

This commit is contained in:
Manus
2026-02-11 05:24:18 -05:00
parent cd61c75c4c
commit fcf9e8f7b7
4 changed files with 83 additions and 4 deletions

View File

@@ -413,6 +413,12 @@ export async function getImportLogsByUser(userId: number): Promise<ImportLog[]>
return db.select().from(importLogs).where(eq(importLogs.userId, userId)).orderBy(desc(importLogs.importedAt));
}
export async function deleteAllImportLogs(userId: number): Promise<void> {
const db = await getDb();
if (!db) throw new Error("Database not available");
await db.delete(importLogs).where(eq(importLogs.userId, userId));
}
// ============= LLM LOG OPERATIONS =============
export async function createLlmLog(data: InsertLlmLog): Promise<LlmLog> {