DmitrMakeev
commited on
Commit
•
61688b6
1
Parent(s):
dc49f25
Update app.py
Browse files
app.py
CHANGED
@@ -150,9 +150,16 @@ def start_mailings():
|
|
150 |
|
151 |
|
152 |
|
|
|
|
|
153 |
@app.route('/add_data_gc', methods=['GET'])
|
154 |
def add_data_gc():
|
155 |
try:
|
|
|
|
|
|
|
|
|
|
|
156 |
name = request.args.get('name')
|
157 |
phone = request.args.get('phone')
|
158 |
email = request.args.get('email')
|
@@ -207,12 +214,18 @@ def add_data_gc():
|
|
207 |
except Exception as e:
|
208 |
print(f"Error adding/updating contact: {e}")
|
209 |
return "Internal Server Error", 500
|
|
|
210 |
|
211 |
|
212 |
|
213 |
@app.route('/add_data_ras', methods=['GET'])
|
214 |
def add_contact():
|
215 |
try:
|
|
|
|
|
|
|
|
|
|
|
216 |
name = request.args.get('name')
|
217 |
phone = request.args.get('phone')
|
218 |
email = request.args.get('email')
|
|
|
150 |
|
151 |
|
152 |
|
153 |
+
api_key_sys = 'your_api_key_here' # Замените на ваш реальный API ключ
|
154 |
+
|
155 |
@app.route('/add_data_gc', methods=['GET'])
|
156 |
def add_data_gc():
|
157 |
try:
|
158 |
+
api_sys_control = request.args.get('api_sys')
|
159 |
+
|
160 |
+
if api_sys_control != api_key_sys:
|
161 |
+
return "EUR 22", 200
|
162 |
+
|
163 |
name = request.args.get('name')
|
164 |
phone = request.args.get('phone')
|
165 |
email = request.args.get('email')
|
|
|
214 |
except Exception as e:
|
215 |
print(f"Error adding/updating contact: {e}")
|
216 |
return "Internal Server Error", 500
|
217 |
+
|
218 |
|
219 |
|
220 |
|
221 |
@app.route('/add_data_ras', methods=['GET'])
|
222 |
def add_contact():
|
223 |
try:
|
224 |
+
api_sys_control = request.args.get('api_sys')
|
225 |
+
|
226 |
+
if api_sys_control != api_key_sys:
|
227 |
+
return "EUR 22", 200
|
228 |
+
|
229 |
name = request.args.get('name')
|
230 |
phone = request.args.get('phone')
|
231 |
email = request.args.get('email')
|