Commit 00206fb6 authored by Tristan Cavelier's avatar Tristan Cavelier

fix error messages, localstorage.js

parent 52012503
...@@ -110,7 +110,7 @@ var newLocalStorage = function (spec, my) { ...@@ -110,7 +110,7 @@ var newLocalStorage = function (spec, my) {
doc = localstorage.getItem( doc = localstorage.getItem(
priv.localpath + "/" + doc); priv.localpath + "/" + doc);
if (doc === null) { if (doc === null) {
// the document does not exists // the document does not exist
localstorage.setItem( localstorage.setItem(
priv.localpath + "/" + command.getDocId(), priv.localpath + "/" + command.getDocId(),
command.cloneDoc()); command.cloneDoc());
...@@ -139,7 +139,7 @@ var newLocalStorage = function (spec, my) { ...@@ -139,7 +139,7 @@ var newLocalStorage = function (spec, my) {
doc = localstorage.getItem( doc = localstorage.getItem(
priv.localpath + "/" + command.getDocId()); priv.localpath + "/" + command.getDocId());
if (doc === null) { if (doc === null) {
// the document does not exists // the document does not exist
doc = command.cloneDoc(); doc = command.cloneDoc();
} else { } else {
// the document already exists // the document already exists
...@@ -164,7 +164,7 @@ var newLocalStorage = function (spec, my) { ...@@ -164,7 +164,7 @@ var newLocalStorage = function (spec, my) {
doc = localstorage.getItem( doc = localstorage.getItem(
priv.localpath + "/" + command.getDocId()); priv.localpath + "/" + command.getDocId());
if (doc === null) { if (doc === null) {
// the document does not exists // the document does not exist
that.error({ that.error({
"status": 404, "status": 404,
"statusText": "Not Found", "statusText": "Not Found",
...@@ -219,8 +219,8 @@ var newLocalStorage = function (spec, my) { ...@@ -219,8 +219,8 @@ var newLocalStorage = function (spec, my) {
"status": 404, "status": 404,
"statusText": "Not Found", "statusText": "Not Found",
"error": "not_found", "error": "not_found",
"message": "Cannot find the attachment ", "message": "Cannot find the attachment",
"reason": "attachment does not exists" "reason": "Attachment does not exist"
}); });
} }
} else { } else {
...@@ -235,7 +235,7 @@ var newLocalStorage = function (spec, my) { ...@@ -235,7 +235,7 @@ var newLocalStorage = function (spec, my) {
"statusText": "Not Found", "statusText": "Not Found",
"error": "not_found", "error": "not_found",
"message": "Cannot find the document", "message": "Cannot find the document",
"reason": "Document does not exists" "reason": "Document does not exist"
}); });
} }
} }
......
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