1
0
Fork 0

fixed require

This commit is contained in:
jsteemann 2017-03-16 15:19:41 +01:00
parent 2cf17c0c5d
commit 42aefaa8bf
1 changed files with 6 additions and 7 deletions

View File

@ -26,13 +26,6 @@ var actions = require('@arangodb/actions');
var internal = require('internal');
var db = internal.db;
var graph_module;
if (internal.isEnterprise()) {
graph_module = require('@arangodb/smart-graph');
} else {
graph_module = require('@arangodb/general-graph');
}
// //////////////////////////////////////////////////////////////////////////////
// / @brief create a "bad parameter" error
// //////////////////////////////////////////////////////////////////////////////
@ -82,6 +75,12 @@ function post_api_pregel (req, res) {
actions.resultOk(req, res, actions.HTTP_OK, executionNum);
} else if (json.graphName && typeof json.graphName === 'string') {
var graph_module;
if (internal.isEnterprise()) {
graph_module = require('@arangodb/smart-graph');
} else {
graph_module = require('@arangodb/general-graph');
}
var graph = graph_module._graph(json.graphName);
if (graph) {
var vertexCollections = [];