DmitrMakeev commited on
Commit
dce6748
·
verified ·
1 Parent(s): fbc802c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -2256,13 +2256,26 @@ def upload_page_vk():
2256
  def serve_html_vk(filename):
2257
  try:
2258
  # Получаем параметры из GET-запроса
2259
- fullUrl = ""
2260
  apps_id = request.args.get('apps_id')
2261
  base_url = request.args.get('fullUrl')
2262
  vk_are_notifications_enabled = request.args.get('vk_are_notifications_enabled')
2263
  vk_is_app_user = request.args.get('vk_is_app_user')
2264
- logging.debug(f"Received params: apps_id={apps_id}, fullUrl={fullUrl}, vk_are_notifications_enabled={vk_are_notifications_enabled}, vk_is_app_user={vk_is_app_user}")
2265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2266
  # Преобразуем строку в JSON
2267
  try:
2268
  api_key_apps_vk_dict = json.loads(api_key_apps_vk)
 
2256
  def serve_html_vk(filename):
2257
  try:
2258
  # Получаем параметры из GET-запроса
 
2259
  apps_id = request.args.get('apps_id')
2260
  base_url = request.args.get('fullUrl')
2261
  vk_are_notifications_enabled = request.args.get('vk_are_notifications_enabled')
2262
  vk_is_app_user = request.args.get('vk_is_app_user')
2263
+ logging.debug(f"Received params: apps_id={apps_id}, vk_are_notifications_enabled={vk_are_notifications_enabled}, vk_is_app_user={vk_is_app_user}")
2264
 
2265
+
2266
+ # Параметры запроса
2267
+ params = {
2268
+ 'vk_app_id': vk_app_id,
2269
+ 'vk_are_notifications_enabled': vk_are_notifications_enabled,
2270
+ 'vk_is_app_user': vk_is_app_user
2271
+ }
2272
+
2273
+
2274
+ # Формирование URL с использованием f-строк
2275
+ fullUrl = f"{base_url}?{'&'.join([f'{key}={value}' for key, value in params.items()])}"
2276
+
2277
+
2278
+
2279
  # Преобразуем строку в JSON
2280
  try:
2281
  api_key_apps_vk_dict = json.loads(api_key_apps_vk)