Heya! This book is currently only available in German. If you'd like to be notified about the upcoming English version, please subscribe here!

Code: listing-03.04.1

module.deleteDocument = function(id) {
    module.request(module.createUrl(id), function(res) {
      var url = id + "?rev=" + res._rev 
      module.request(module.createUrl(url), function(res) {
        $errorMessage.html('Dokument mit \\
           der ID ' + id + ' gelöscht')
        module.list()
      }, 'DELETE')
    })
  }

Wieder alle anzeigen…