23 lines
472 B
Python
23 lines
472 B
Python
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
|