Checkpoint: Ajout du bouton "Effacer les logs" dans la page Historique d'import avec confirmation de suppression.
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user