Convert num to number in registration confirmation

This commit is contained in:
Mark Veidemanis 2022-08-14 16:09:32 +01:00
parent 02739abaf4
commit e30250603b
1 changed files with 3 additions and 0 deletions

View File

@ -654,6 +654,9 @@ class API(object):
if not len(spl) == 2:
return dumps({"success": False, "reason": f"malformed item: {item}"})
net, num = spl
if not num.isdigit():
return dumps({"success": False, "reason": "invalid num: not a number."})
num = int(num)
if token:
regproc.confirmAccount(net, num, token)
return dumps({"success": True})