Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created October 21, 2009 20:05
Show Gist options
  • Select an option

  • Save brandon-beacher/215419 to your computer and use it in GitHub Desktop.

Select an option

Save brandon-beacher/215419 to your computer and use it in GitHub Desktop.
exports.PagesController = {
index: function(request, response) {
var params = {
startkey: [request.customerId, request.organizationId],
endkey: [request.customerId, request.organizationId, {}]
};
DESIGN.view('pages_by_path').get(params, function(couchResponse, json) {
response.finish_with_404(couchResponse.body);
});
},
show: function(request, response) {
var path = request.captures[0];
var key = [request.customerId, request.organizationId, path];
DESIGN.view('pages_by_path').get({ key: key }, function(couchResponse, json) {
response.finish_with_404(couchResponse.body);
});
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment