1
0
Fork 0

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

This commit is contained in:
hkernbach 2016-09-29 15:18:18 +02:00
commit 750b5625cc
4 changed files with 19 additions and 3 deletions

View File

@ -135,6 +135,12 @@ devel
* Agency bug fix for handling of empty json objects as values.
v3.0.11 (2016-XX-XX)
--------------------
* fixed issue #2038
v3.0.10 (XXXX-XX-XX)
--------------------

View File

@ -1213,7 +1213,7 @@ int ClusterInfo::dropCollectionCoordinator(std::string const& databaseName,
numberOfShards = shards.length();
} else {
LOG_TOPIC(ERR, Logger::CLUSTER) << "Missing shards information on dropping"
<< databaseName << "/" << collectionID;
<< databaseName << "/" << collectionID;
}
}

View File

@ -23,6 +23,7 @@
// //////////////////////////////////////////////////////////////////////////////
const _ = require('lodash');
const joi = require('joi');
const assert = require('assert');
const typeIs = require('type-is');
const mediaTyper = require('media-typer');
@ -110,12 +111,16 @@ exports.parseRequestBody = function parseRequestBody (def, req) {
exports.validateRequestBody = function validateRequestBody (def, req) {
let body = req.body;
const schema = def.model && (def.model.schema || def.model);
let schema = def.model && (def.model.schema || def.model);
if (!schema) {
return body;
}
if (schema.isJoi) {
if (def.multiple) {
schema = joi.array().items(schema).required();
}
const result = schema.validate(body);
if (result.error) {
@ -127,7 +132,11 @@ exports.validateRequestBody = function validateRequestBody (def, req) {
}
if (def.model && def.model.fromClient) {
body = def.model.fromClient(body);
if (def.multiple) {
body = body.map((body) => def.model.fromClient(body));
} else {
body = def.model.fromClient(body);
}
}
return body;

View File

@ -118,6 +118,7 @@ for aid in `seq 0 $(( $POOLSZ - 1 ))`; do
--server.authentication false \
--server.endpoint $TRANSPORT://localhost:$port \
--server.statistics false \
--server.threads 4 \
$SSLKEYFILE \
> agency/$port.stdout 2>&1 &
PIDS+=$!