fix: Fix doas not working

master
John Montagu, the 4th Earl of Sandvich 2025-05-13 23:29:01 -07:00
parent 4bc6cf7e3c
commit c05794ad99
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 6 additions and 1 deletions

View File

@ -47,8 +47,13 @@ def get_all_users(player: Player, **kwargs):
@requires_authentication
@requires_admin
def set_doas(steam_id: str, **_):
try:
steam_id_int = int(steam_id)
except ValueError:
abort(400, "steam_id must be an integer")
player = db.session.query(Player).where(
Player.steam_id == steam_id
Player.steam_id == steam_id_int
).one_or_none()
if not player: