diff --git a/oauth/backend/app/api/v1/endpoints/auth.py b/oauth/backend/app/api/v1/endpoints/auth.py index 837b1b7..713188b 100644 --- a/oauth/backend/app/api/v1/endpoints/auth.py +++ b/oauth/backend/app/api/v1/endpoints/auth.py @@ -43,9 +43,9 @@ async def token(): async def register(user_data: UserCreate): """Register a new user""" # Get database - db = get_database() + database = get_database() # Check if user already exists - users_collection = db["users"] + users_collection = database["users"] existing_user = await users_collection.find_one({"email": user_data.email}) if existing_user: diff --git a/oauth/frontend/vite.config.ts b/oauth/frontend/vite.config.ts index bf958b4..16a0a4b 100644 --- a/oauth/frontend/vite.config.ts +++ b/oauth/frontend/vite.config.ts @@ -5,9 +5,10 @@ import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { + host: true, proxy: { '/api': { - target: 'http://localhost:8000', + target: 'http://backend:8000', changeOrigin: true, secure: false, }