DmitrMakeev commited on
Commit
a1d3cd4
·
verified ·
1 Parent(s): e86b0f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -41,7 +41,7 @@ ALLOWED_ORIGIN = "https://diamonik7777-up-fail.hf.space"
41
 
42
  # Глобальные переменные для хранения настроек
43
  api_key_auth = ''
44
- crypto_key_auth = ''
45
  crypto_key_url = ''
46
  vk_api_key = ''
47
  senler_token = ''
@@ -184,12 +184,12 @@ DATABASE_NEW = 'data_gc.db'
184
 
185
 
186
  def load_settings():
187
- global api_key_auth, crypto_key_auth, crypto_key_url, vk_api_key
188
  global senler_token, wa_ak, wa_api_key, curators, call_api_key
189
 
190
  default_settings = {
191
  'api_key_auth': '',
192
- 'crypto_key_auth': '',
193
  'crypto_key_url': '',
194
  'vk_api_key': '',
195
  'senler_token': '',
@@ -212,7 +212,7 @@ def load_settings():
212
 
213
  # Заполняем глобальные переменные
214
  api_key_auth = settings['api_key_auth']
215
- crypto_key_auth = settings['crypto_key_auth']
216
  crypto_key_url = settings['crypto_key_url']
217
  vk_api_key = settings['vk_api_key']
218
  senler_token = settings['senler_token']
@@ -228,7 +228,7 @@ def load_settings():
228
  print(f"senler_token: {senler_token}")
229
 
230
  print(f"api_key_auth: {api_key_auth}")
231
- print(f"crypto_key_auth: {crypto_key_auth}")
232
  print(f"crypto_key_url: {crypto_key_url}")
233
  print(f"curators: {curators}")
234
  print(f"call_api_key: {call_api_key}")
@@ -243,7 +243,7 @@ def load_settings():
243
  load_settings()
244
 
245
  def save_settings(settings_dict):
246
- global api_key_auth, crypto_key_auth, crypto_key_url, vk_api_key
247
  global senler_token, wa_ak, wa_api_key, curators, call_api_key
248
 
249
  # Удаляем api_key_sys из словаря перед сохранением
@@ -265,7 +265,7 @@ def save_settings(settings_dict):
265
  senler_token = ?, wa_ak = ?, wa_api_key = ?, curators = ?, call_api_key = ?
266
  ''', (
267
  settings_dict.get('api_key_auth', ''),
268
- settings_dict.get('crypto_key_auth', ''),
269
  settings_dict.get('crypto_key_url', ''),
270
  settings_dict.get('vk_api_key', ''),
271
  settings_dict.get('senler_token', ''),
@@ -278,12 +278,12 @@ def save_settings(settings_dict):
278
  # Создаем новую запись
279
  cursor.execute('''
280
  INSERT INTO settings (
281
- api_key_auth, crypto_key_auth, crypto_key_url, vk_api_key, senler_token,
282
  wa_ak, wa_api_key, curators, call_api_key
283
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
284
  ''', (
285
  settings_dict.get('api_key_auth', ''),
286
- settings_dict.get('crypto_key_auth', ''),
287
  settings_dict.get('crypto_key_url', ''),
288
  settings_dict.get('vk_api_key', ''),
289
  settings_dict.get('senler_token', ''),
@@ -298,7 +298,7 @@ def save_settings(settings_dict):
298
 
299
  # Обновляем глобальные переменные
300
  api_key_auth = settings_dict.get('api_key_auth', '')
301
- crypto_key_auth = settings_dict.get('crypto_key_auth', '')
302
  crypto_key_url = settings_dict.get('crypto_key_url', '')
303
  vk_api_key = settings_dict.get('vk_api_key', '')
304
  senler_token = settings_dict.get('senler_token', '')
@@ -314,7 +314,7 @@ def save_settings(settings_dict):
314
  print(f"senler_token: {senler_token}")
315
 
316
  print(f"api_key_auth: {api_key_auth}")
317
- print(f"crypto_key_auth: {crypto_key_auth}")
318
  print(f"crypto_key_url: {crypto_key_url}")
319
  print(f"curators: {curators}")
320
  print(f"call_api_key: {call_api_key}")
 
41
 
42
  # Глобальные переменные для хранения настроек
43
  api_key_auth = ''
44
+ api_key_apps_vk = ''
45
  crypto_key_url = ''
46
  vk_api_key = ''
47
  senler_token = ''
 
184
 
185
 
186
  def load_settings():
187
+ global api_key_auth, api_key_apps_vk, crypto_key_url, vk_api_key
188
  global senler_token, wa_ak, wa_api_key, curators, call_api_key
189
 
190
  default_settings = {
191
  'api_key_auth': '',
192
+ 'api_key_apps_vk': '',
193
  'crypto_key_url': '',
194
  'vk_api_key': '',
195
  'senler_token': '',
 
212
 
213
  # Заполняем глобальные переменные
214
  api_key_auth = settings['api_key_auth']
215
+ api_key_apps_vk = settings['api_key_apps_vk']
216
  crypto_key_url = settings['crypto_key_url']
217
  vk_api_key = settings['vk_api_key']
218
  senler_token = settings['senler_token']
 
228
  print(f"senler_token: {senler_token}")
229
 
230
  print(f"api_key_auth: {api_key_auth}")
231
+ print(f"api_key_apps_vk: {api_key_apps_vk}")
232
  print(f"crypto_key_url: {crypto_key_url}")
233
  print(f"curators: {curators}")
234
  print(f"call_api_key: {call_api_key}")
 
243
  load_settings()
244
 
245
  def save_settings(settings_dict):
246
+ global api_key_auth, api_key_apps_vk, crypto_key_url, vk_api_key
247
  global senler_token, wa_ak, wa_api_key, curators, call_api_key
248
 
249
  # Удаляем api_key_sys из словаря перед сохранением
 
265
  senler_token = ?, wa_ak = ?, wa_api_key = ?, curators = ?, call_api_key = ?
266
  ''', (
267
  settings_dict.get('api_key_auth', ''),
268
+ settings_dict.get('api_key_apps_vk', ''),
269
  settings_dict.get('crypto_key_url', ''),
270
  settings_dict.get('vk_api_key', ''),
271
  settings_dict.get('senler_token', ''),
 
278
  # Создаем новую запись
279
  cursor.execute('''
280
  INSERT INTO settings (
281
+ api_key_auth, api_key_apps_vk, crypto_key_url, vk_api_key, senler_token,
282
  wa_ak, wa_api_key, curators, call_api_key
283
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
284
  ''', (
285
  settings_dict.get('api_key_auth', ''),
286
+ settings_dict.get('api_key_apps_vk', ''),
287
  settings_dict.get('crypto_key_url', ''),
288
  settings_dict.get('vk_api_key', ''),
289
  settings_dict.get('senler_token', ''),
 
298
 
299
  # Обновляем глобальные переменные
300
  api_key_auth = settings_dict.get('api_key_auth', '')
301
+ api_key_apps_vk = settings_dict.get('api_key_apps_vk', '')
302
  crypto_key_url = settings_dict.get('crypto_key_url', '')
303
  vk_api_key = settings_dict.get('vk_api_key', '')
304
  senler_token = settings_dict.get('senler_token', '')
 
314
  print(f"senler_token: {senler_token}")
315
 
316
  print(f"api_key_auth: {api_key_auth}")
317
+ print(f"api_key_apps_vk: {api_key_apps_vk}")
318
  print(f"crypto_key_url: {crypto_key_url}")
319
  print(f"curators: {curators}")
320
  print(f"call_api_key: {call_api_key}")