I'm not familiar with Mango, can't tell...
About 404: What I think is missing, for CouchApps, is some kind of hook to 
adapt the answer. But I think I could manage with the frontend. I give you an 
example: I use vhosts to redirect to a given document representing a school. If 
was really complicated to make a proper webpage displaying that a school is not 
existing (to avoid a CouchDB error in case of missing document!). Customising 
404 is something quite common on webservers I think. However, for this 
particular scenario with subdocuments, if 404 return a Json with the missing 
id, it would be fine to deal with I think.

Here is how I use rewrites (one line extracted from my API, I have a hundred 
like this):

    { "from": "webapp/:school/api/timetables/:timetableid/teachers/:teacherid", 
"to": `"_update/api/:school", "method": "POST", "query": { "module": 
"timetables", "callback": "os_timetables_teachers_post", "access": "admin", 
"timetableid": ":timetableid", "teacherid": ":teacherid" } },`

So, if it can be changed to:
`"to": "_update/api/:school/_/timetables/:timetableid/teachers/:teacherid"`
it would be fantastatic!  :)

[ Full content available at: https://github.com/apache/couchdb/issues/1559 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to