function executeScript(scriptName, context) {

    const requestID = ServiceManager.getRequestID(scriptName, context);

    return (dispatch) => {
        dispatch(didStartRequest(requestID));

        return ServiceManager.executeScript(scriptName, context)
            .then(
            (results) => {
                dispatch(didReceiveResponse(requestID, results));
                return Promise.resolve(results);
            },
            (error) => {
                dispatch(didReceiveError(requestID, error));
                return Promise.resolve();
            });
    }
}
// TODO: Temporary - Replace this part in the middleware
Replace this part in the middleware
Replace this part in the middleware
function executeScript(scriptName, context) {
    const requestID = ServiceManager.getRequestID(scriptName, context);
    return (dispatch) => {
        dispatch(didStartRequest(requestID));
        return ServiceManager.executeScript(scriptName, context)
            .then(
            (results) => {
                dispatch(didReceiveResponse(requestID, results));
                return Promise.resolve(results);
            },
            (error) => {
                dispatch(didReceiveError(requestID, error));
                return Promise.resolve();
            });
    }
}
function executeScript ( scriptName , context ) { const requestID = ServiceManager . getRequestID ( scriptName , context ) ; return ( dispatch ) => { dispatch ( didStartRequest ( requestID ) ) ; return ServiceManager . executeScript ( scriptName , context ) . then ( ( results ) => { dispatch ( didReceiveResponse ( requestID , results ) ) ; return Promise . resolve ( results ) ; } , ( error ) => { dispatch ( didReceiveError ( requestID , error ) ) ; return Promise . resolve ( ) ; } ) ; } }
TODO: Temporary - Replace this part in the middleware
TODO : Temporary - Replace this part in the middleware