         # db.view seems to alter the options object
         # cloning the object before each query prevents that
         query = JSON.parse JSON.stringify body
-        db.view "#{params.type}/#{params.req_name}", query, (err, res) ->
+        path = "#{params.type}/#{@appName}-#{params.req_name}"
+        db.view path, query, (err, res) ->
             if err
                 send error: "not found", 404
             else

        send out




# POST /request/:type/:req_name
action 'results', ->
    db.view "#{params.type}/#{params.req_name}", body, (err, res) ->
        if err
            if err.error is "not_found"
                send error: "not found", 404

# PUT /request/:type/:req_name
action 'definition', ->
    # no need to precise language because it's javascript
    db.get "_design/#{params.type}", (err, res) =>

        if err && err.error is 'not_found'
            design_doc = {}
