def make_route(self, route) -> dict:
        """ Construct a route to be parsed into flask App """
        middleware = route['middleware'] if 'middleware' in route else None
        # added to ALL requests to support xhr cross-site requests
        route['methods'].append('OPTIONS')
        return {
            'url': route['url'],
            'name': route['name'],
            'methods': route['methods'],
            'middleware': middleware,
            'callback': {
                'module': route['function'].__module__,
                'class': route['function'].__qualname__.rsplit('.', 1)[0],
                'function': route['function'].__name__
            }
        }
def make_route ( self , route ) -> dict : middleware = route [ 'middleware' ] if 'middleware' in route else None route [ 'methods' ] . append ( 'OPTIONS' ) return { 'url' : route [ 'url' ] , 'name' : route [ 'name' ] , 'methods' : route [ 'methods' ] , 'middleware' : middleware , 'callback' : { 'module' : route [ 'function' ] . __module__ , 'class' : route [ 'function' ] . __qualname__ . rsplit ( '.' , 1 ) [ 0 ] , 'function' : route [ 'function' ] . __name__ } }
Construct a route to be parsed into flask App