mirror of
https://github.com/openmax-server/server.git
synced 2026-06-18 08:58:27 +03:00
MAX: Рефактор папок
This commit is contained in:
@@ -403,17 +403,26 @@ class AuthProcessors(BaseProcessor):
|
||||
await cursor.execute(
|
||||
"""
|
||||
INSERT INTO user_data
|
||||
(phone, folders, user_config, chat_config)
|
||||
VALUES (%s, %s, %s, %s)
|
||||
(phone, user_config, chat_config)
|
||||
VALUES (%s, %s, %s)
|
||||
""",
|
||||
(
|
||||
phone,
|
||||
json.dumps(self.static.USER_FOLDERS),
|
||||
json.dumps(self.static.USER_SETTINGS),
|
||||
json.dumps({}),
|
||||
),
|
||||
)
|
||||
|
||||
# Добавляем дефолтную папку
|
||||
await cursor.execute(
|
||||
"""
|
||||
INSERT INTO user_folders
|
||||
(id, phone, title, sort_order)
|
||||
VALUES ('all.chat.folder', %s, 'Все', 0)
|
||||
""",
|
||||
(phone,),
|
||||
)
|
||||
|
||||
# Удаляем токен
|
||||
await cursor.execute(
|
||||
"DELETE FROM auth_tokens WHERE token_hash = %s", (hashed_token,)
|
||||
|
||||
Reference in New Issue
Block a user