🎉 init starlette dial

This commit is contained in:
loveuer
2025-06-28 19:03:29 +08:00
commit 739a518e51
19 changed files with 1375 additions and 0 deletions

22
handler/other.py Normal file
View File

@@ -0,0 +1,22 @@
from starlette.requests import Request
from starlette.responses import JSONResponse
from pkg.dial import client
async def handle_login(request: Request):
response = await client.dial(
"http://127.0.0.1:3000/api/v3/auth/login",
"POST",
body={"username": "admin", "password": "123456"},
)
data = response.json()
print(f"[D] data = {data}")
return JSONResponse(data)
async def handle_auth_check(request: Request):
pass