mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
refactoring
This commit is contained in:
@@ -32,10 +32,10 @@ from . import get_configured_auth_service
|
||||
|
||||
|
||||
# =====
|
||||
async def _handle_auth(request: aiohttp.web.BaseRequest) -> aiohttp.web.Response:
|
||||
async def _handle_auth(req: aiohttp.web.BaseRequest) -> aiohttp.web.Response:
|
||||
status = 400
|
||||
if request.method == "POST":
|
||||
credentials = (await request.json())
|
||||
if req.method == "POST":
|
||||
credentials = (await req.json())
|
||||
if credentials["user"] == "admin" and credentials["passwd"] == "pass":
|
||||
status = 200
|
||||
return aiohttp.web.Response(text=str(status), status=status)
|
||||
|
||||
Reference in New Issue
Block a user