Changeset 527 for Dev/trunk/src/server/api/surveys.js
- Timestamp:
- 03/23/14 17:26:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/server/api/surveys.js
r525 r527 23 23 couch.get(url) 24 24 .handle({ 25 '-1': _.identity, 25 26 200: function(result) { 26 27 return _.map(result.rows, function(item) { … … 30 31 default: util.handleUnknownResponse 31 32 }) 33 .handle({'-1': util.handleException}) 32 34 .handle(res.send.bind(res)); 33 35 }); … … 45 47 hr = util.postDocument('Survey',doc); 46 48 } 47 hr.handle(res.send.bind(res)); 49 hr.handle({'-1': util.handleException}) 50 .handle(res.send.bind(res)); 48 51 }); 49 52 app.get('/:id', … … 66 69 util.putDocument(id,rev,'Survey',doc) 67 70 .handle({ 71 '-1': function(result) { 72 util.handleException(result) 73 .handle(res.send.bind(res)); 74 }, 68 75 201: function(doc) { 69 76 res.set({
Note: See TracChangeset
for help on using the changeset viewer.