del fastapi-users

This commit is contained in:
2025-07-16 17:01:10 +03:00
parent db3a2c7010
commit 87b1646f85
8 changed files with 149 additions and 169 deletions

View File

@ -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