Browse Source

Обновить 'jsonAndRequest.py'

1 changed files with 4 additions and 4 deletions
  1. 4 4
      jsonAndRequest.py

+ 4 - 4
jsonAndRequest.py

@@ -39,13 +39,13 @@ def requestGetToken() -> str:
 #Функция обращения к апи и получение токена
 def createUser(username, phone, password, url) -> str:
     data = {
-        "username": "",
-        "phone_number": "",
-        "password": ""
+        "username": username,
+        "phone_number": phone,
+        "password": password
     } 
     response = requests.post(url, json=data)
     result = response.json()
-    return result['auth_token']
+    return result
 #Функция обращения к апи и получение списка пользователей
 def requestGetListUser():
     auth_token=requestGetToken()