Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -817,6 +817,7 @@ def verify_phone_number_biz(phone_number): | |
| 817 | 
             
                else:
         | 
| 818 | 
             
                    return "Error"
         | 
| 819 |  | 
|  | |
| 820 | 
             
            def update_or_insert_user_biz(db_name, user_data, mapping_template):
         | 
| 821 | 
             
                conn = sqlite3.connect(db_name)
         | 
| 822 | 
             
                cursor = conn.cursor()
         | 
| @@ -921,8 +922,8 @@ def update_or_insert_user_biz(db_name, user_data, mapping_template): | |
| 921 | 
             
                conn.close()
         | 
| 922 | 
             
                logging.debug(f"User with email {email} processed successfully")
         | 
| 923 |  | 
| 924 | 
            -
            @app.route('/ | 
| 925 | 
            -
            def  | 
| 926 | 
             
                token = request.args.get('token')
         | 
| 927 | 
             
                webinarId = request.args.get('webinarId')
         | 
| 928 | 
             
                url = f'https://online.bizon365.ru/api/v1/webinars/reports/get?webinarId={webinarId}'
         | 
| @@ -969,8 +970,8 @@ def send_get_request(): | |
| 969 | 
             
                except requests.exceptions.RequestException as e:
         | 
| 970 | 
             
                    return jsonify({'error': f'API request failed: {str(e)}'}), 500
         | 
| 971 |  | 
| 972 | 
            -
            @app.route('/ | 
| 973 | 
            -
            def  | 
| 974 | 
             
                api_sys_control = request.args.get('api_sys')
         | 
| 975 | 
             
                if api_sys_control != api_key_sys:
         | 
| 976 | 
             
                    return "EUR 22", 200
         | 
| @@ -1031,9 +1032,6 @@ def webhookbz(): | |
| 1031 |  | 
| 1032 |  | 
| 1033 |  | 
| 1034 | 
            -
             | 
| 1035 | 
            -
             | 
| 1036 | 
            -
             | 
| 1037 | 
             
            @app.route('/biz_v', methods=['GET'])
         | 
| 1038 | 
             
            def biz_v():
         | 
| 1039 | 
             
                api_sys_control = request.args.get('api_sys')
         | 
|  | |
| 817 | 
             
                else:
         | 
| 818 | 
             
                    return "Error"
         | 
| 819 |  | 
| 820 | 
            +
             | 
| 821 | 
             
            def update_or_insert_user_biz(db_name, user_data, mapping_template):
         | 
| 822 | 
             
                conn = sqlite3.connect(db_name)
         | 
| 823 | 
             
                cursor = conn.cursor()
         | 
|  | |
| 922 | 
             
                conn.close()
         | 
| 923 | 
             
                logging.debug(f"User with email {email} processed successfully")
         | 
| 924 |  | 
| 925 | 
            +
            @app.route('/send_get_request', methods=['GET'])
         | 
| 926 | 
            +
            def send_get_request_biz():
         | 
| 927 | 
             
                token = request.args.get('token')
         | 
| 928 | 
             
                webinarId = request.args.get('webinarId')
         | 
| 929 | 
             
                url = f'https://online.bizon365.ru/api/v1/webinars/reports/get?webinarId={webinarId}'
         | 
|  | |
| 970 | 
             
                except requests.exceptions.RequestException as e:
         | 
| 971 | 
             
                    return jsonify({'error': f'API request failed: {str(e)}'}), 500
         | 
| 972 |  | 
| 973 | 
            +
            @app.route('/webhookbz', methods=['POST'])
         | 
| 974 | 
            +
            def webhookbz_biz():
         | 
| 975 | 
             
                api_sys_control = request.args.get('api_sys')
         | 
| 976 | 
             
                if api_sys_control != api_key_sys:
         | 
| 977 | 
             
                    return "EUR 22", 200
         | 
|  | |
| 1032 |  | 
| 1033 |  | 
| 1034 |  | 
|  | |
|  | |
|  | |
| 1035 | 
             
            @app.route('/biz_v', methods=['GET'])
         | 
| 1036 | 
             
            def biz_v():
         | 
| 1037 | 
             
                api_sys_control = request.args.get('api_sys')
         |