Refactor API routing and update login URLs
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m16s

- Updated the OAuth routes to be included under the main API prefix for better organization.
- Changed the Google login URL in the SocialLoginButtons component to reflect the new API structure.

These changes aim to improve the clarity and consistency of the API routing and enhance the login flow for users.
This commit is contained in:
mohamad 2025-06-01 22:37:44 +02:00
parent e6c15210c1
commit 6d5e950918
2 changed files with 5 additions and 2 deletions

View File

@ -182,10 +182,13 @@ app.include_router(
)
# Include OAuth routes
app.include_router(oauth_router, prefix="/auth", tags=["auth"])
# app.include_router(oauth_router, prefix="/auth", tags=["auth"])
# Include your API router
app.include_router(api_router, prefix=settings.API_PREFIX)
# Include OAuth routes under the main API prefix
app.include_router(oauth_router, prefix=f"{settings.API_PREFIX}/auth", tags=["auth"])
# --- End Include API Routers ---
# Health check endpoint

View File

@ -39,7 +39,7 @@ import { useRouter } from 'vue-router';
const router = useRouter();
const handleGoogleLogin = () => {
window.location.href = '/auth/google/login';
window.location.href = '/api/v1/auth/google/login';
};
const handleAppleLogin = () => {