del fastapi-users
This commit is contained in:
@ -20,7 +20,13 @@ async def load_fernet():
|
||||
|
||||
async def login(name: str, password: str):
|
||||
async with httpx.AsyncClient() as client:
|
||||
r = await client.post(f'http://127.0.0.1:7535/login?name={name}&password={password}')
|
||||
r = await client.post(
|
||||
'http://127.0.0.1:7535/login',
|
||||
json={
|
||||
"username": name,
|
||||
"password": password
|
||||
}
|
||||
)
|
||||
|
||||
if r.is_success:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user