fix: remove_recent() — nettoie les fichiers récents après suppression
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s

This commit is contained in:
2026-05-29 21:27:18 -04:00
parent 1243782b6a
commit 279e632b4b
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -49,7 +49,7 @@ from backend.vault_settings import (
get_vault_setting,
update_vault_setting,
)
from backend.history import record_open, get_recent_opened, toggle_bookmark, get_bookmarks, is_bookmarked
from backend.history import record_open, get_recent_opened, remove_recent, toggle_bookmark, get_bookmarks, is_bookmarked
logging.basicConfig(
level=logging.INFO,
@@ -1372,6 +1372,9 @@ async def api_file_delete(vault_name: str, path: str = Query(..., description="R
"path": path,
})
# Remove from recent files
remove_recent(current_user["username"], vault_name, path)
# Dispatch webhooks
await dispatch_webhooks("file_deleted", {"vault": vault_name, "path": path})