feat(fetcher): add data fetcher

This commit is contained in:
MingxuanGame
2025-07-26 16:06:53 +08:00
parent 585cb9d98a
commit cca4a2f1be
13 changed files with 880 additions and 639 deletions

14
app/router/fetcher.py Normal file
View File

@@ -0,0 +1,14 @@
from __future__ import annotations
from app.dependencies.fetcher import get_fetcher
from app.fetcher import Fetcher
from fastapi import APIRouter, Depends
fetcher_router = APIRouter()
@fetcher_router.get("/callback")
async def callback(code: str, fetcher: Fetcher = Depends(get_fetcher)):
await fetcher.grant_access_token(code)
return {"message": "Login successful"}