DmitrMakeev commited on
Commit
3f56d68
1 Parent(s): 3d64fc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -270,11 +270,22 @@ def data_gc_tab_out():
270
 
271
  conn = sqlite3.connect('data_gc.db')
272
  cursor = conn.cursor()
273
- cursor.execute('SELECT name, phone, email FROM contacts')
 
 
 
 
274
  contacts = cursor.fetchall()
275
  conn.close()
276
 
277
- contacts_json = [{'name': contact[0], 'phone': contact[1], 'email': contact[2]} for contact in contacts]
 
 
 
 
 
 
 
278
  return jsonify(contacts_json), 200
279
  except Exception as e:
280
  print(f"Error getting data from data_gc: {e}")
 
270
 
271
  conn = sqlite3.connect('data_gc.db')
272
  cursor = conn.cursor()
273
+ cursor.execute('''
274
+ SELECT id, name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
275
+ shop_statys_full, curator, shop_statys_cur, partner, pr1, pr2, pr3, pr4, pr5, ad_url
276
+ FROM contacts
277
+ ''')
278
  contacts = cursor.fetchall()
279
  conn.close()
280
 
281
+ contacts_json = [{
282
+ 'id': contact[0], 'name': contact[1], 'phone': contact[2], 'email': contact[3],
283
+ 'vk_id': contact[4], 'chat_id': contact[5], 'ws_statys': contact[6], 'ws_stop': contact[7],
284
+ 'web_statys': contact[8], 'fin_progress': contact[9], 'shop_statys_full': contact[10],
285
+ 'curator': contact[11], 'shop_statys_cur': contact[12], 'partner': contact[13],
286
+ 'pr1': contact[14], 'pr2': contact[15], 'pr3': contact[16], 'pr4': contact[17],
287
+ 'pr5': contact[18], 'ad_url': contact[19]
288
+ } for contact in contacts]
289
  return jsonify(contacts_json), 200
290
  except Exception as e:
291
  print(f"Error getting data from data_gc: {e}")