Convert auth token removal websocket api to normal functions (#109432)

There was nothing being awaited here anymore
pull/109493/head
J. Nick Koston 2024-02-03 00:47:07 -06:00 committed by GitHub
parent 0884215130
commit 53db392150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -578,6 +578,7 @@ def websocket_refresh_tokens(
connection.send_result(msg["id"], tokens)
@callback
@websocket_api.websocket_command(
{
vol.Required("type"): "auth/delete_refresh_token",
@ -585,8 +586,7 @@ def websocket_refresh_tokens(
}
)
@websocket_api.ws_require_user()
@websocket_api.async_response
async def websocket_delete_refresh_token(
def websocket_delete_refresh_token(
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
) -> None:
"""Handle a delete refresh token request."""
@ -601,6 +601,7 @@ async def websocket_delete_refresh_token(
connection.send_result(msg["id"], {})
@callback
@websocket_api.websocket_command(
{
vol.Required("type"): "auth/delete_all_refresh_tokens",
@ -609,8 +610,7 @@ async def websocket_delete_refresh_token(
}
)
@websocket_api.ws_require_user()
@websocket_api.async_response
async def websocket_delete_all_refresh_tokens(
def websocket_delete_all_refresh_tokens(
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
) -> None:
"""Handle delete all refresh tokens request."""