From db30b33d5a1bfa870bea0218aac9a32d694c7758 Mon Sep 17 00:00:00 2001 From: Serhii Ofii <132130496+SnowGlowedMountain@users.noreply.github.com> Date: Mon, 21 Oct 2024 01:16:30 +0300 Subject: [PATCH] Serhii milestone 2 fix (#62) * chores_lint_errors_and_path_issues * feature_db_py * fix_audio_issue * chores_lint_error * fix_openAPI_switching * chore_module_insert * fix_edit_collection_fix * fix_frontend_critical_update * fix_feedback2_translation_async * chore:lint * chore:loading_issue * chore:module * chore:version-python-socketio[asgi] * chore:main.py * chore:path * test * chore:apprunner * chore:reverse * fix:cors_error * chore:cors * chore:cors --- frontend/src/App.tsx | 2 +- frontend/src/{ProtectedRoute.tsx => PrivateRoute.tsx} | 0 linguaphoto/main.py | 2 +- linguaphoto/requirements.txt | 1 - linguaphoto/socket_manager.py | 1 - 5 files changed, 2 insertions(+), 4 deletions(-) rename frontend/src/{ProtectedRoute.tsx => PrivateRoute.tsx} (100%) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6b7c0d1..f1c41ef 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -14,7 +14,7 @@ import LoginPage from "pages/Login"; import NotFound from "pages/NotFound"; import SubscriptionTypePage from "pages/SubscriptioinType"; import SubscriptionCancelPage from "pages/Subscription"; -import PrivateRoute from "ProtectedRoute"; +import PrivateRoute from "PrivateRoute"; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import "./App.css"; diff --git a/frontend/src/ProtectedRoute.tsx b/frontend/src/PrivateRoute.tsx similarity index 100% rename from frontend/src/ProtectedRoute.tsx rename to frontend/src/PrivateRoute.tsx diff --git a/linguaphoto/main.py b/linguaphoto/main.py index 6650254..6673296 100644 --- a/linguaphoto/main.py +++ b/linguaphoto/main.py @@ -23,8 +23,8 @@ ) app.include_router(router, prefix="") +app = socketio.ASGIApp(sio, app) -app.mount("/", socketio.ASGIApp(sio, other_asgi_app=app)) if __name__ == "__main__": print("Starting webserver...") uvicorn.run(app, port=8080, host="0.0.0.0") diff --git a/linguaphoto/requirements.txt b/linguaphoto/requirements.txt index f968e98..0bde136 100644 --- a/linguaphoto/requirements.txt +++ b/linguaphoto/requirements.txt @@ -41,4 +41,3 @@ openai requests stripe python-socketio - diff --git a/linguaphoto/socket_manager.py b/linguaphoto/socket_manager.py index be5ae46..06880a5 100644 --- a/linguaphoto/socket_manager.py +++ b/linguaphoto/socket_manager.py @@ -11,7 +11,6 @@ settings.homepage_url ], # Update this to match your frontend URL ) - # Dictionary to store connected users by their socket ID connected_users: dict[str, str] = {}