Changeset 490 for Dev/trunk/src/server/app.js
- Timestamp:
- 03/08/14 22:51:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/server/app.js
r487 r490 149 149 function identity(obj) { return obj; } 150 150 function handleUnknownResponse(status,error){ 151 return new HTTPResult(500,{error: "Unexpected database response", 152 innerStatus: status, innerResponse: error}); 151 return new HTTPResult(500,{error: error.reason}); 153 152 } 154 153 function handleUnknownError(error){ … … 393 392 .handle({ 394 393 200: function(others) { 395 if ( others.length > 0 ) {394 if ( others.length > 0 && _.some(others,function(other){ return other._id !== id; }) ) { 396 395 return new HTTPResult(403,{error:"Other question with this code already exists."}); 397 396 } else {
Note: See TracChangeset
for help on using the changeset viewer.