diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-01-13 19:01:04 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-01-13 19:01:04 +0100 |
commit | 26631dadc7cf1406060f2574ce3dda484066ac6a (patch) | |
tree | a95cd6d94e1c0ee823cc777a1ba6b34681852af3 /api/randid.py | |
parent | 20ffb510f63d9d9cdabf0aca7343de1cb3b0bf22 (diff) |
semi- user registration
Diffstat (limited to 'api/randid.py')
-rw-r--r-- | api/randid.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/api/randid.py b/api/randid.py new file mode 100644 index 0000000..a6ff11f --- /dev/null +++ b/api/randid.py @@ -0,0 +1,11 @@ +from main import cursor +import uuid + +def new_uuid(): + temp_uuid = str(uuid.uuid4()) + query = cursor.execute("select user_id from users where user_id = \"{temp_uuid}\"").fetchone() + if query: + return new_uuid() + else: + return temp_uuid + |