1
0
Fork 0

fixed collection type selection when creating collection via web interface

Conflicts:
	CHANGELOG
This commit is contained in:
Jan Steemann 2014-03-12 17:52:51 +01:00
parent f20e253daf
commit 0862d45f0a
3 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,13 @@ v2.1.0 (XXXX-XX-XX)
* removed arangod command line option `--database.remove-on-compacted` * removed arangod command line option `--database.remove-on-compacted`
v2.0.1 (XXXX-XX-XX)
-------------------
* when creating a collection via the web interface, the collection type was always
"document", regardless of the user's choice
v2.0.0 (2014-03-10) v2.0.0 (2014-03-10)
------------------- -------------------

View File

@ -316,7 +316,7 @@ function post_api_collection (req, res) {
try { try {
var collection; var collection;
if (typeof(r.type) === "string") { if (typeof(r.type) === "string") {
if (r.type.toLowerCase() === "edge") { if (r.type.toLowerCase() === "edge" || r.type === "3") {
r.type = arangodb.ArangoCollection.TYPE_EDGE; r.type = arangodb.ArangoCollection.TYPE_EDGE;
} }
} }

View File

@ -272,7 +272,7 @@
data.name = collName; data.name = collName;
data.waitForSync = wfs; data.waitForSync = wfs;
data.isSystem = isSystem; data.isSystem = isSystem;
data.type = collType; data.type = parseInt(collType, 10);
if (shards) { if (shards) {
data.numberOfShards = shards; data.numberOfShards = shards;
data.shardKeys = keys; data.shardKeys = keys;