DmitrMakeev commited on
Commit
93565ea
·
verified ·
1 Parent(s): 6cabe2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -28
app.py CHANGED
@@ -237,36 +237,10 @@ def handle_incoming_request():
237
 
238
  if current_day in [0, 4, 5, 6]: # Понедельник, Пятница, Суббота, Воскресенье
239
  # Отправляем запросы в листы подряд
240
- data_1 = {
241
- "email": email,
242
- "unconfirmed": False,
243
- "values": [
244
- {
245
- "parameter_id": 393120,
246
- "kind": "string",
247
- "list_id": list_id_1,
248
- "title": "phone",
249
- "value": phone
250
- },
251
- {
252
- "parameter_id": 393119,
253
- "kind": "string",
254
- "list_id": list_id_1,
255
- "title": "name",
256
- "value": name
257
- }
258
- ]
259
- }
260
- headers = {
261
- 'Authorization': f'Bearer {token}',
262
- 'Content-Type': 'application/json'
263
- }
264
-
265
- # Отправляем первый запрос и сохраняем ответ
266
- response_1 = requests.post(f"{base_url}/email/lists/{list_id_1}/recipients", json=data_1, headers=headers)
267
 
268
  # Возвращаем список ответов
269
- return {'responses': [response_1.json()]}
270
 
271
 
272
 
 
237
 
238
  if current_day in [0, 4, 5, 6]: # Понедельник, Пятница, Суббота, Воскресенье
239
  # Отправляем запросы в листы подряд
240
+ response_1 = send_request(list_id_1, email, phone, name, 393120, 393119, pr5, pr4, pr3, pr2, pr1, 393248, 393247, 393246, 393245, 393244)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
 
242
  # Возвращаем список ответов
243
+ return {'responses': [response_1]}
244
 
245
 
246