mirror of https://gitee.com/bigwinds/arangodb
Fix naming
This commit is contained in:
parent
1243dc503d
commit
4ad6ddef3b
|
@ -33,7 +33,7 @@ var arangodb = require('@arangodb');
|
||||||
var ArangoCollection = arangodb.ArangoCollection;
|
var ArangoCollection = arangodb.ArangoCollection;
|
||||||
var ArangoError = arangodb.ArangoError;
|
var ArangoError = arangodb.ArangoError;
|
||||||
var errors = require("internal").errors;
|
var errors = require("internal").errors;
|
||||||
var request = require('@arangodb/request').requestCluster;
|
var request = require('@arangodb/request').clusterRequest;
|
||||||
var wait = require('internal').wait;
|
var wait = require('internal').wait;
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ var internal = require('internal');
|
||||||
var endpointToURL = require('@arangodb/cluster').endpointToURL;
|
var endpointToURL = require('@arangodb/cluster').endpointToURL;
|
||||||
var request;
|
var request;
|
||||||
if (ArangoServerState.role() == 'PRIMARY') {
|
if (ArangoServerState.role() == 'PRIMARY') {
|
||||||
request = require('@arangodb/request').requestCluster;
|
request = require('@arangodb/request').clusterRequest;
|
||||||
} else {
|
} else {
|
||||||
request = require('@arangodb/request').request;
|
request = require('@arangodb/request').request;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ function querystringify (query, useQuerystring) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestCluster(req) {
|
function clusterRequest(req) {
|
||||||
if (typeof req === 'string') {
|
if (typeof req === 'string') {
|
||||||
req = {url: req, method: 'GET'};
|
req = {url: req, method: 'GET'};
|
||||||
}
|
}
|
||||||
|
@ -151,5 +151,5 @@ function requestCluster(req) {
|
||||||
let result = internal.clusterDownload(path, body, options);
|
let result = internal.clusterDownload(path, body, options);
|
||||||
return new Response(result, req.encoding, req.json);
|
return new Response(result, req.encoding, req.json);
|
||||||
}
|
}
|
||||||
exports.requestCluster = requestCluster;
|
exports.clusterRequest = clusterRequest;
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
Loading…
Reference in New Issue