🎉 init starlette dial
This commit is contained in:
22
handler/other.py
Normal file
22
handler/other.py
Normal 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
|
||||
Reference in New Issue
Block a user