mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
refactoring
This commit is contained in:
@@ -111,10 +111,10 @@ class RedfishApi:
|
||||
}, wrap_result=False)
|
||||
|
||||
@exposed_http("POST", "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset")
|
||||
async def __power_handler(self, request: Request) -> Response:
|
||||
async def __power_handler(self, req: Request) -> Response:
|
||||
try:
|
||||
action = check_string_in_list(
|
||||
arg=(await request.json())["ResetType"],
|
||||
arg=(await req.json()).get("ResetType"),
|
||||
name="Redfish ResetType",
|
||||
variants=set(self.__actions),
|
||||
lower=False,
|
||||
|
||||
Reference in New Issue
Block a user