001-drive-proxy-adapter #1
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* ARCHITECTURE:
|
||||
* - Loaded by server.js using vm.Script (same as proxy.js)
|
||||
* - Function that returns a single object containing all helper functions
|
||||
* - Returns a single object containing all helper functions
|
||||
* - Injected into globalVariableContext for access by proxy.js
|
||||
* - NO IMPORTS - All dependencies provided via VM context
|
||||
*
|
||||
@@ -17,7 +17,6 @@
|
||||
* @returns {Object} Helpers object with all utility functions
|
||||
*/
|
||||
|
||||
(function() {
|
||||
/**
|
||||
* Custom error for document count exceeding limit
|
||||
*/
|
||||
@@ -282,11 +281,12 @@
|
||||
// All other paths return 404
|
||||
return { route: null, error: "Not found", statusCode: 404 };
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Return helpers object with all functions
|
||||
// =============================================================================
|
||||
|
||||
return {
|
||||
({
|
||||
// Error classes
|
||||
DocumentCountExceededError,
|
||||
|
||||
@@ -309,5 +309,4 @@
|
||||
|
||||
// Routing
|
||||
parseRoute,
|
||||
};
|
||||
})();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user