mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(edit) if storage disabled - hash not getted
This commit is contained in:
parent
a344339bae
commit
98bcbdb7e8
1 changed files with 12 additions and 6 deletions
|
|
@ -156,6 +156,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
|
|||
|
||||
Util.ifExec(!isDiff, function(patch) {
|
||||
var query,
|
||||
isAllowed = DOM.Storage.isAllowed(),
|
||||
isString = Util.isString(patch),
|
||||
lessLength = patch.length < lValue.length;
|
||||
|
||||
|
|
@ -166,13 +167,18 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
|
|||
query = '?patch';
|
||||
}
|
||||
|
||||
DOM.checkStorageHash(lPath, function(error, equal) {
|
||||
if (!error) {
|
||||
if (!equal)
|
||||
query = '';
|
||||
|
||||
|
||||
Util.ifExec(!isAllowed, function() {
|
||||
DOM.RESTful.save(lPath, lValue, onSave, query);
|
||||
}
|
||||
}, function(callback) {
|
||||
DOM.checkStorageHash(lPath, function(error, equal) {
|
||||
if (!error) {
|
||||
if (!equal)
|
||||
query = '';
|
||||
|
||||
callback();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}, function(callback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue