Comparing version 0.2.3-15 to 0.2.4-16
@@ -470,3 +470,3 @@ var mongodb = require("mongodb"); | ||
var fileObjectId = new ObjectId(); | ||
var groupId = fileObjectId; | ||
var groupId = fileObjectId.toString(); | ||
if(options.groupId){ | ||
@@ -529,7 +529,5 @@ groupId = options.groupId; | ||
if(searchOptions.groupId){ | ||
if(searchOptions.groupId === "string"){ | ||
searchQuery["metadata.groupId"] = ObjectId(searchOptions.groupId); | ||
} else { | ||
searchQuery["metadata.groupId"] = searchOptions.groupId; | ||
} | ||
searchQuery["metadata.groupId"] = searchOptions.groupId; | ||
} else if(searchOptions.hash){ | ||
@@ -566,8 +564,6 @@ searchQuery.md5 = searchOptions.hash; | ||
if(fileSelectionCriteria.groupId){ | ||
if(fileSelectionCriteria.groupId === "string"){ | ||
selectionQuery= {"metadata.groupId": ObjectId(fileSelectionCriteria.groupId)}; | ||
} else { | ||
selectionQuery= {"metadata.groupId": fileSelectionCriteria.groupId}; | ||
} | ||
} else if(fileSelectionCriteria.hash){ | ||
@@ -574,0 +570,0 @@ selectionQuery= {"md5": fileSelectionCriteria.hash}; |
{ | ||
"name": "fh-gridfs", | ||
"version": "0.2.3-15", | ||
"version": "0.2.4-16", | ||
"description": "Wrapper for file storage using gridfs for mongo databases.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -1,1 +0,1 @@ | ||
0.2.3-15 | ||
0.2.4-16 |
35537
551