DmitrMakeev
commited on
Commit
•
d55fbcb
1
Parent(s):
ac2650e
Update app.py
Browse files
app.py
CHANGED
@@ -198,14 +198,16 @@ def add_data_gc():
|
|
198 |
WHERE phone = ? OR email = ?
|
199 |
''', (name, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
200 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
|
|
|
201 |
else:
|
202 |
cursor.execute('''
|
203 |
INSERT INTO contacts (
|
204 |
name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
205 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
|
206 |
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
207 |
''', (name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
208 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
|
|
|
209 |
|
210 |
conn.commit()
|
211 |
conn.close()
|
@@ -353,8 +355,6 @@ def data_gc_tab_out():
|
|
353 |
'pr1': contact[12], 'pr2': contact[13], 'pr3': contact[14], 'pr4': contact[15],
|
354 |
'pr5': contact[16], 'ad_url': contact[17]
|
355 |
} for contact in contacts]
|
356 |
-
|
357 |
-
print('Data to be returned:', contacts_json) # Логирование данных
|
358 |
return jsonify(contacts_json), 200
|
359 |
except Exception as e:
|
360 |
print(f"Error getting data from data_gc: {e}")
|
@@ -368,7 +368,6 @@ def data_gc_tab_out():
|
|
368 |
|
369 |
|
370 |
|
371 |
-
|
372 |
|
373 |
|
374 |
|
|
|
198 |
WHERE phone = ? OR email = ?
|
199 |
''', (name, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
200 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
|
201 |
+
print(f"Updated contact: {name} - {phone} - {email}")
|
202 |
else:
|
203 |
cursor.execute('''
|
204 |
INSERT INTO contacts (
|
205 |
name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
206 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
|
207 |
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
208 |
''', (name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
|
209 |
shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
|
210 |
+
print(f"Inserted new contact: {name} - {phone} - {email}")
|
211 |
|
212 |
conn.commit()
|
213 |
conn.close()
|
|
|
355 |
'pr1': contact[12], 'pr2': contact[13], 'pr3': contact[14], 'pr4': contact[15],
|
356 |
'pr5': contact[16], 'ad_url': contact[17]
|
357 |
} for contact in contacts]
|
|
|
|
|
358 |
return jsonify(contacts_json), 200
|
359 |
except Exception as e:
|
360 |
print(f"Error getting data from data_gc: {e}")
|
|
|
368 |
|
369 |
|
370 |
|
|
|
371 |
|
372 |
|
373 |
|