Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -140,6 +140,8 @@ def save_db():
|
|
140 |
@app.route('/save_pl', methods=['POST'])
|
141 |
def save_pl():
|
142 |
list_id1 = '560768'
|
|
|
|
|
143 |
data = request.json
|
144 |
name = data.get('name')
|
145 |
email = data.get('email')
|
@@ -172,7 +174,48 @@ def save_pl():
|
|
172 |
"value": name
|
173 |
}
|
174 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
})
|
|
|
176 |
]
|
177 |
# Вторник
|
178 |
elif current_day == 1:
|
|
|
140 |
@app.route('/save_pl', methods=['POST'])
|
141 |
def save_pl():
|
142 |
list_id1 = '560768'
|
143 |
+
list_id2 = '560832'
|
144 |
+
list_id3 = '560833'
|
145 |
data = request.json
|
146 |
name = data.get('name')
|
147 |
email = data.get('email')
|
|
|
174 |
"value": name
|
175 |
}
|
176 |
]
|
177 |
+
}),
|
178 |
+
(f"{base_url}/email/lists/{list_id2}/recipients_mon_fri_sat_sun", {
|
179 |
+
"email": email,
|
180 |
+
"unconfirmed": True,
|
181 |
+
"values": [
|
182 |
+
{
|
183 |
+
"parameter_id": 393120,
|
184 |
+
"kind": "string",
|
185 |
+
"list_id": list_id1,
|
186 |
+
"title": "phone",
|
187 |
+
"value": phone
|
188 |
+
},
|
189 |
+
{
|
190 |
+
"parameter_id": 393119,
|
191 |
+
"kind": "string",
|
192 |
+
"list_id": list_id1,
|
193 |
+
"title": "name",
|
194 |
+
"value": name
|
195 |
+
}
|
196 |
+
]
|
197 |
+
}),
|
198 |
+
(f"{base_url}/email/lists/{list_id3}/recipients_mon_fri_sat_sun", {
|
199 |
+
"email": email,
|
200 |
+
"unconfirmed": True,
|
201 |
+
"values": [
|
202 |
+
{
|
203 |
+
"parameter_id": 393120,
|
204 |
+
"kind": "string",
|
205 |
+
"list_id": list_id1,
|
206 |
+
"title": "phone",
|
207 |
+
"value": phone
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"parameter_id": 393119,
|
211 |
+
"kind": "string",
|
212 |
+
"list_id": list_id1,
|
213 |
+
"title": "name",
|
214 |
+
"value": name
|
215 |
+
}
|
216 |
+
]
|
217 |
})
|
218 |
+
|
219 |
]
|
220 |
# Вторник
|
221 |
elif current_day == 1:
|