diff options
author | James Lal <james@lightsofapollo.com> | 2012-06-26 12:41:13 +0200 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-06-26 12:41:13 +0200 |
commit | 95d50ef280c46ce6a29454285ccd7fc42cbcac61 (patch) | |
tree | c9516585ef17fdf00228b1c8533c5d2fa1c88a3a /lib/webcals/request/propfind.js | |
parent | 10900e01370c1fd4d147168cdc30ed81a77dcf44 (diff) | |
download | jsCalDAV-95d50ef280c46ce6a29454285ccd7fc42cbcac61.tar.gz |
Add process result so we can have cleaner propfind results
Diffstat (limited to 'lib/webcals/request/propfind.js')
-rw-r--r-- | lib/webcals/request/propfind.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/webcals/request/propfind.js b/lib/webcals/request/propfind.js index 9e06b49..d73530c 100644 --- a/lib/webcals/request/propfind.js +++ b/lib/webcals/request/propfind.js @@ -42,6 +42,18 @@ _createPayload: function() { var content = this.template.tag('prop', this._props.join('')); return this.template.render(content); + }, + + _processResult: function(req, callback) { + if ('multistatus' in this.sax.root) { + callback(null, this.sax.root.multistatus, req); + } else { + //XXX: Improve error handling + callback( + new Error('unexpected xml result'), + this.sax.root, req + ); + } } }; |