mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
be442d38c7
|
@ -37,6 +37,7 @@ const examples = require('@arangodb/graph-examples/example-graph');
|
||||||
const createRouter = require('@arangodb/foxx/router');
|
const createRouter = require('@arangodb/foxx/router');
|
||||||
const users = require('@arangodb/users');
|
const users = require('@arangodb/users');
|
||||||
const cluster = require('@arangodb/cluster');
|
const cluster = require('@arangodb/cluster');
|
||||||
|
const isEnterprise = require('internal').isEnterprise();
|
||||||
|
|
||||||
const ERROR_USER_NOT_FOUND = errors.ERROR_USER_NOT_FOUND.code;
|
const ERROR_USER_NOT_FOUND = errors.ERROR_USER_NOT_FOUND.code;
|
||||||
const API_DOCS = require(module.context.fileName('api-docs.json'));
|
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) {
|
authRouter.get('/graph/:name', function (req, res) {
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var name = req.pathParams.name;
|
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 = {
|
var colors = {
|
||||||
default: [
|
default: [
|
||||||
'#68BDF6',
|
'#68BDF6',
|
||||||
|
|
|
@ -250,6 +250,8 @@ router.post('/', function (req, res) {
|
||||||
case errors.ERROR_GRAPH_WRONG_COLLECTION_TYPE_VERTEX.code:
|
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_EDGE_DEF.code:
|
||||||
case errors.ERROR_GRAPH_COLLECTION_USED_IN_ORPHANS.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(
|
throw Object.assign(
|
||||||
new httperr.BadRequest(e.errorMessage),
|
new httperr.BadRequest(e.errorMessage),
|
||||||
{errorNum: e.errorNum, cause: e}
|
{errorNum: e.errorNum, cause: e}
|
||||||
|
|
Loading…
Reference in New Issue