Merge pull request #93 from bmartin5692/fix-92

change randomid to 4 characters
This commit is contained in:
Brian Martin 2020-01-25 15:30:26 -05:00 committed by GitHub
commit eece03efd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ class portal_api_iot(plugins.ConfServerApp):
try: try:
json_body = json.loads(await request.text()) json_body = json.loads(await request.text())
randomid = "".join(random.sample(string.ascii_letters, 6)) randomid = "".join(random.sample(string.ascii_letters, 4))
did = "" did = ""
if "toId" in json_body: # Its a command if "toId" in json_body: # Its a command
did = json_body["toId"] did = json_body["toId"]