diff --git a/backend/__pycache__/api_routes.cpython-311.pyc b/backend/__pycache__/api_routes.cpython-311.pyc index 2a83a73..c0aa6cc 100644 Binary files a/backend/__pycache__/api_routes.cpython-311.pyc and b/backend/__pycache__/api_routes.cpython-311.pyc differ diff --git a/backend/__pycache__/db_queries.cpython-311.pyc b/backend/__pycache__/db_queries.cpython-311.pyc index f2f0aa7..1ae39bc 100644 Binary files a/backend/__pycache__/db_queries.cpython-311.pyc and b/backend/__pycache__/db_queries.cpython-311.pyc differ diff --git a/backend/api_routes.py b/backend/api_routes.py index 8bfb42c..4575134 100644 --- a/backend/api_routes.py +++ b/backend/api_routes.py @@ -868,19 +868,18 @@ def api_delete_post(post_id: int): return _error("You don't have permission to delete this post.", 403) try: + add_audit_log({ + "user_id": user_id, + "action": "post.deleted", + "details": json.dumps({"deleted_post_id": post_id, "title": post.get("title")}) + }) + delete_rag_chunks(post_id) delete_archive_files(post_id) delete_metadata(post_id) delete_rights(post_id) delete_audio_post(post_id) - add_audit_log({ - "post_id": post_id, - "user_id": user_id, - "action": "post.deleted", - "details": json.dumps({"title": post.get("title")}) - }) - return jsonify({"message": "Post deleted successfully", "post_id": post_id}) except Exception as e: diff --git a/backend/uploads/00ce7e87-614d-44f7-a300-0ac8fb4af2bd_data.m4a b/backend/uploads/00ce7e87-614d-44f7-a300-0ac8fb4af2bd_data.m4a new file mode 100644 index 0000000..38e5740 Binary files /dev/null and b/backend/uploads/00ce7e87-614d-44f7-a300-0ac8fb4af2bd_data.m4a differ diff --git a/backend/uploads/28b3ced4-4174-4555-ad9c-cb0adff1fbba_harvard.wav b/backend/uploads/28b3ced4-4174-4555-ad9c-cb0adff1fbba_harvard.wav new file mode 100644 index 0000000..b05ec79 Binary files /dev/null and b/backend/uploads/28b3ced4-4174-4555-ad9c-cb0adff1fbba_harvard.wav differ diff --git a/frontend/public/Logo.png b/frontend/public/Logo.png new file mode 100644 index 0000000..6ca06f6 Binary files /dev/null and b/frontend/public/Logo.png differ diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index d48ffae..e8b5ddf 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -61,6 +61,7 @@ export default function App() { localStorage.removeItem('voicevault_user') setShowLogin(true) setActiveTab('feed') + setViewingPostId(null) } const handleSearch = async (query) => { @@ -91,9 +92,15 @@ export default function App() { setViewingPostId(null) } + const handleTabChange = (tab) => { + setActiveTab(tab) + setViewingPostId(null) + } + const handlePostCreated = () => { // Switch to feed after creating a post setActiveTab('feed') + setViewingPostId(null) } const handleUserUpdate = (updatedUser) => { @@ -202,11 +209,16 @@ export default function App() { // Main App return ( -