HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall_new/buyercall/buyercall/blueprints/api/doc/endpoints/adf.py
import logging

from flask import request
from flask_restx import Resource

from buyercall.blueprints.api.restplus import api
#from buyercall.blueprints.widgets.rest_api import process_adf_request

log = logging.getLogger(__name__)
ns = api.namespace('adf', description='Operations related to ADF leads.')


@ns.route('')
@api.doc(responses={500: 'Internal Server Error',
                    200: 'OK',
                    404: 'Method not found or not supported'},
         security=None,
         authorizations=None)
class ApiAdf(Resource):
    def post(self):
        """
        Method is used to perform ADF functions.

        An email lead in ADF format is forward to this endpoint and processed.

        """
        if request:
            #if process_adf_request(request):
            return "OK", 200
        else:
            api.abort(code=404)