-
-
Notifications
You must be signed in to change notification settings - Fork 144
fix: proper 401 handling with session reset and redirect #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1e57ac9
3709a9d
00d2679
c1fcbda
54f69c7
9af9525
372a64e
3a180ae
af6394b
d5ca8a5
7249439
0273bb0
6b5fbae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| from .v1.github import router as github_router | ||
| from fastapi import APIRouter | ||
| from .v1.auth import router as auth_router | ||
| from .v1.health import router as health_router | ||
| from .v1.integrations import router as integrations_router | ||
|
|
||
| api_router = APIRouter() | ||
|
|
||
| api_router.include_router( | ||
| github_router, | ||
| prefix="/v1/github", | ||
| tags=["GitHub"] | ||
| ) | ||
|
Comment on lines
+9
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§© Analysis chainπ Script executed: #!/bin/bash
# Find all routes that serve beginner-issues
echo "=== Searching for beginner-issues registrations ==="
rg -n 'beginner.issues' --type=py -B2 -A2
echo -e "\n=== Checking backend/routes.py existence ==="
find . -name "routes.py" -type f | head -20
echo -e "\n=== Checking for github router in app/api ==="
find . -path "*/app/api*" -name "*.py" -type f | head -20Repository: AOSSIE-Org/Devr.AI Length of output: 3781 π Script executed: #!/bin/bash
echo "=== backend/routes.py: beginner-issues endpoint ==="
sed -n '102,127p' backend/routes.py
echo -e "\n=== backend/app/api/v1/github.py: beginner-issues endpoint ==="
sed -n '10,35p' backend/app/api/v1/github.pyRepository: AOSSIE-Org/Devr.AI Length of output: 1476 Remove or consolidate the duplicate beginner-issues endpoint. Two endpoints serve identical functionality: π€ Prompt for AI Agents |
||
|
|
||
|
|
||
| api_router.include_router( | ||
| auth_router, | ||
| prefix="/v1/auth", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| from fastapi import APIRouter, HTTPException | ||
| from app.services.github.issue_suggestion_service import IssueSuggestionService | ||
| from app.core.config import settings | ||
|
|
||
| router = APIRouter() | ||
|
|
||
|
|
||
| @router.get("/beginner-issues") | ||
| async def get_beginner_issues( | ||
| language: str = "python", | ||
| limit: int = 5 | ||
| ): | ||
| """ | ||
| Fetch global beginner-friendly GitHub issues. | ||
| """ | ||
|
|
||
| token = settings.github_token_resolved | ||
|
|
||
| if not token: | ||
| raise HTTPException( | ||
| status_code=500, | ||
| detail="GitHub token not configured" | ||
| ) | ||
|
|
||
| issue_service = IssueSuggestionService(token) | ||
|
|
||
| try: | ||
| issues = await issue_service.fetch_beginner_issues( | ||
| language=language, | ||
| limit=limit | ||
| ) | ||
|
|
||
| return { | ||
| "language": language, | ||
| "count": len(issues), | ||
| "issues": issues | ||
| } | ||
|
|
||
| except Exception as e: | ||
| raise HTTPException( | ||
| status_code=500, | ||
| detail="Failed to fetch beginner issues" | ||
| ) from e |
Uh oh!
There was an error while loading. Please reload this page.