bug fixes in couchapp
This commit is contained in:
parent
92f4871696
commit
38462375b4
4 changed files with 21 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
// example reduce function to count the
|
||||
// number of rows in a given key range.
|
||||
|
||||
function(keys, value, rereduce) {
|
||||
function(keys, values, rereduce) {
|
||||
if (rereduce) {
|
||||
return sum(values);
|
||||
} else {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
var dbname = document.location.href.split('/')[3];
|
||||
var design = unescape(document.location.href.split('/')[4]).split('/')[1];
|
||||
var DB = $.couch.db(dbname);
|
||||
DB.view(design+"/example-map",{success: function(json) {
|
||||
DB.view(design+"/example",{success: function(json) {
|
||||
$("#view").html(json.rows.map(function(row) {
|
||||
return '<li>'+row.key+'</li>';
|
||||
}).join(''));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue