Changeset 531 for Dev/trunk/src/server/api/util.js
- Timestamp:
- 03/27/14 14:44:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/server/api/util.js
r527 r531 81 81 82 82 var getDocumentsOfType = exports.getDocumentsOfType = function(type) { 83 var url = '_design/default/_view/by_type?key='+JSON.stringify(type);84 return couch.get(url)83 return couch.get('_design/default/_view/by_type', 84 {query:{reduce:false,include_docs:true,key:type}}) 85 85 .handle({ 86 86 '-1': _.identity, 87 200: handleRow Values,87 200: handleRowDocs, 88 88 404: function() { return {error: "Cannot find collection of type "+type}; }, 89 89 default: handleUnknownResponse
Note: See TracChangeset
for help on using the changeset viewer.