1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
hkernbach 2016-10-21 15:21:03 +02:00
commit be442d38c7
2 changed files with 9 additions and 1 deletions

View File

@ -37,6 +37,7 @@ const examples = require('@arangodb/graph-examples/example-graph');
const createRouter = require('@arangodb/foxx/router');
const users = require('@arangodb/users');
const cluster = require('@arangodb/cluster');
const isEnterprise = require('internal').isEnterprise();
const ERROR_USER_NOT_FOUND = errors.ERROR_USER_NOT_FOUND.code;
const API_DOCS = require(module.context.fileName('api-docs.json'));
@ -289,7 +290,12 @@ authRouter.get('/job', function (req, res) {
authRouter.get('/graph/:name', function (req, res) {
var _ = require('lodash');
var name = req.pathParams.name;
var gm = require('@arangodb/general-graph');
var gm;
if (isEnterprise) {
gm = require('@arangodb/smart-graph');
} else {
gm = require('@arangodb/general-graph');
}
var colors = {
default: [
'#68BDF6',

View File

@ -250,6 +250,8 @@ router.post('/', function (req, res) {
case errors.ERROR_GRAPH_WRONG_COLLECTION_TYPE_VERTEX.code:
case errors.ERROR_GRAPH_COLLECTION_USED_IN_EDGE_DEF.code:
case errors.ERROR_GRAPH_COLLECTION_USED_IN_ORPHANS.code:
case errors.ERROR_ARANGO_DUPLICATE_NAME.code:
require('console').error("Message:", e.errorMessage);
throw Object.assign(
new httperr.BadRequest(e.errorMessage),
{errorNum: e.errorNum, cause: e}