DmitrMakeev
commited on
Commit
•
5c466f8
1
Parent(s):
d0fbc65
Update app.py
Browse files
app.py
CHANGED
@@ -1784,6 +1784,7 @@ def from_shop_st():
|
|
1784 |
order = request.args.get('order', '')
|
1785 |
status = request.args.get('status', '')
|
1786 |
del_flag = request.args.get('del', '')
|
|
|
1787 |
|
1788 |
if not email or not phone:
|
1789 |
return json.dumps({"error": "Email and phone are required"}), 400
|
@@ -1868,6 +1869,7 @@ def from_shop_st2():
|
|
1868 |
order = request.args.get('order', '')
|
1869 |
status = request.args.get('status', '')
|
1870 |
del_flag = request.args.get('del', '')
|
|
|
1871 |
|
1872 |
if not email or not phone:
|
1873 |
return json.dumps({"error": "Email and phone are required"}), 400
|
@@ -1894,9 +1896,9 @@ def from_shop_st2():
|
|
1894 |
|
1895 |
shop_st_json = json.dumps(shop_st_data)
|
1896 |
|
1897 |
-
# Исключаем все столбцы, кроме name, phone, email, shop_st
|
1898 |
-
columns_to_update = ['name', 'phone', 'email', 'shop_st']
|
1899 |
-
values_to_update = [name, phone, email, shop_st_json]
|
1900 |
|
1901 |
if result:
|
1902 |
# Обновляем только те поля, которые переданы в запросе
|
@@ -1951,7 +1953,6 @@ def from_shop_st2():
|
|
1951 |
|
1952 |
|
1953 |
|
1954 |
-
|
1955 |
|
1956 |
|
1957 |
@app.route('/gc_in', methods=['GET'])
|
|
|
1784 |
order = request.args.get('order', '')
|
1785 |
status = request.args.get('status', '')
|
1786 |
del_flag = request.args.get('del', '')
|
1787 |
+
n_con_flag = request.args.get('n_con', '') # Добавь прием этого параметра и запись его в столбец базы данных 'n_con'
|
1788 |
|
1789 |
if not email or not phone:
|
1790 |
return json.dumps({"error": "Email and phone are required"}), 400
|
|
|
1869 |
order = request.args.get('order', '')
|
1870 |
status = request.args.get('status', '')
|
1871 |
del_flag = request.args.get('del', '')
|
1872 |
+
n_con_flag = request.args.get('n_con', '') # Добавлен параметр n_con
|
1873 |
|
1874 |
if not email or not phone:
|
1875 |
return json.dumps({"error": "Email and phone are required"}), 400
|
|
|
1896 |
|
1897 |
shop_st_json = json.dumps(shop_st_data)
|
1898 |
|
1899 |
+
# Исключаем все столбцы, кроме name, phone, email, shop_st, n_con
|
1900 |
+
columns_to_update = ['name', 'phone', 'email', 'shop_st', 'n_con']
|
1901 |
+
values_to_update = [name, phone, email, shop_st_json, n_con_flag]
|
1902 |
|
1903 |
if result:
|
1904 |
# Обновляем только те поля, которые переданы в запросе
|
|
|
1953 |
|
1954 |
|
1955 |
|
|
|
1956 |
|
1957 |
|
1958 |
@app.route('/gc_in', methods=['GET'])
|