Commit 15ee9b70 authored by Jonathan Rivalan's avatar Jonathan Rivalan

finition des corrections jslint

parent 2b25d074
...@@ -760,12 +760,16 @@ jIO.addStorageType("s3", function (spec, my) { ...@@ -760,12 +760,16 @@ jIO.addStorageType("s3", function (spec, my) {
); );
} }
function myCallback(response) {
}
that.XHRwrapper(command, docId, '', 'GET', mime, '', false, false, that.XHRwrapper(command, docId, '', 'GET', mime, '', false, false,
function (response) { function (response) {
console.log(response); console.log(response);
var attachKeys = (JSON.parse(response))._attachments; var attachKeys = (JSON.parse(response))._attachments;
var keys; var keys;
for (keys in attachKeys) { for (keys in attachKeys) {
if (attachKeys.hasOwnProperty(keys)) {
that.XHRwrapper(command, that.XHRwrapper(command,
docId, docId,
keys, keys,
...@@ -774,11 +778,10 @@ jIO.addStorageType("s3", function (spec, my) { ...@@ -774,11 +778,10 @@ jIO.addStorageType("s3", function (spec, my) {
'', '',
false, false,
false, false,
function (response) { myCallback
//console.log('this key got deleted : ' + keys);
}
); );
} }
}
deleteDocument(); deleteDocument();
} }
); );
...@@ -878,10 +881,24 @@ jIO.addStorageType("s3", function (spec, my) { ...@@ -878,10 +881,24 @@ jIO.addStorageType("s3", function (spec, my) {
}; };
}; };
var errCallback = function (err) {
if (err.status === 404) {
//status
//statustext "Not Found"
//error
//reason "reason"
//message "did not work"
err.error = "not_found";
that.error(err);
} else {
return that.retry(err);
}
};
var i = resultTable.length - 1; var i = resultTable.length - 1;
var keyId; var keyId;
if (command.getOption("include_docs") === true) { if (command.getOption("include_docs") === true) {
for (i; i >= 0; i--) { for (i; i >= 0; i -= 1) {
keyId = resultTable[i]; keyId = resultTable[i];
var Signature = that.encodeAuthorization(keyId); var Signature = that.encodeAuthorization(keyId);
var callURL = priv.url + keyId; var callURL = priv.url + keyId;
...@@ -914,24 +931,12 @@ jIO.addStorageType("s3", function (spec, my) { ...@@ -914,24 +931,12 @@ jIO.addStorageType("s3", function (spec, my) {
//'x-amz-security-token' : , //'x-amz-security-token' : ,
}, },
success : dealCallback(i, countB, allDocResponse), success : dealCallback(i, countB, allDocResponse),
error : function (err) { error : errCallback(this)
if (err.status === 404) {
//status
//statustext "Not Found"
//error
//reason "reason"
//message "did not work"
err.error = "not_found";
that.error(err);
} else {
return that.retry(err);
}
}
}); });
countB += 1; countB += 1;
} }
} else { } else {
for (i; i >= 0; i--) { for (i; i >= 0; i -= 1) {
keyId = resultTable[i]; keyId = resultTable[i];
allDocResponse.rows[i] = { allDocResponse.rows[i] = {
"id": priv.fileNameToIds(keyId).join(), "id": priv.fileNameToIds(keyId).join(),
......
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