Commit ea446b38 authored by Sven Franck's avatar Sven Franck

localstorage dumb post

parent b008e2eb
...@@ -73,6 +73,16 @@ ...@@ -73,6 +73,16 @@
}, 100); // 100 ms, for jiotests simple job waiting }, 100); // 100 ms, for jiotests simple job waiting
}; // end put }; // end put
that.putAttachment = function (command) {
setTimeout (function () {
that.success ({
ok:true,
id:command.getDocId(),
rev:generateRevision(command, "putAttachment", true)
});
}, 100); // 100 ms, for jiotests simple job waiting
}; // end put
that.get = function (command) { that.get = function (command) {
setTimeout(function () { setTimeout(function () {
that.success ({ that.success ({
......
This diff is collapsed.
...@@ -26,6 +26,10 @@ var command = function(spec, my) { ...@@ -26,6 +26,10 @@ var command = function(spec, my) {
// xxx fixed spec.content to spec.doc.content for PUTATTACHMENT // xxx fixed spec.content to spec.doc.content for PUTATTACHMENT
// xxx need extra check for GET, otherwise spec.doc is undefined // xxx need extra check for GET, otherwise spec.doc is undefined
console.log("COMMAND");
console.log( spec );
console.log( spec.doc );
console.log( spec.doc.content );
priv.content = spec.doc === undefined ? undefined : priv.content = spec.doc === undefined ? undefined :
typeof spec.doc.content === 'string'? typeof spec.doc.content === 'string'?
spec.doc.content: spec.doc.content:
...@@ -80,8 +84,6 @@ var command = function(spec, my) { ...@@ -80,8 +84,6 @@ var command = function(spec, my) {
* @return {object} the document. * @return {object} the document.
*/ */
that.getDoc = function() { that.getDoc = function() {
console.log("where is my doc");
console.log( priv.doc );
return priv.doc; return priv.doc;
}; };
......
...@@ -11,7 +11,8 @@ var putAttachmentCommand = function(spec, my) { ...@@ -11,7 +11,8 @@ var putAttachmentCommand = function(spec, my) {
that.executeOn = function (storage) { that.executeOn = function (storage) {
storage.putAttachment (that); storage.putAttachment (that);
}; };
console.log("putAttachmentCommand");
console.log( typeof that.getContent() );
that.validateState = function () { that.validateState = function () {
if (typeof that.getContent() !== 'string') { if (typeof that.getContent() !== 'string') {
that.error({ that.error({
......
...@@ -147,6 +147,11 @@ ...@@ -147,6 +147,11 @@
}; };
priv.parametersToObject = function (list, default_options) { priv.parametersToObject = function (list, default_options) {
console.log("aloha");
console.log("what do we have");
console.log( list );
console.log( default_options );
var k, i = 0, callbacks = [], param = {options:{}}; var k, i = 0, callbacks = [], param = {options:{}};
for (i = 0; i < list.length; i += 1) { for (i = 0; i < list.length; i += 1) {
if (typeof list[i] === 'object') { if (typeof list[i] === 'object') {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment