mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
Remove second PUT request on image save
closes #2557 - replaced model.save() with model.set()
This commit is contained in:
parent
395d7fd3e2
commit
9ceb4a6ab4
@ -220,14 +220,8 @@
|
|||||||
} else {
|
} else {
|
||||||
data[key] = this.$('.js-upload-target').attr('src');
|
data[key] = this.$('.js-upload-target').attr('src');
|
||||||
}
|
}
|
||||||
|
self.model.set(data);
|
||||||
self.model.save(data, {
|
self.saveSettings();
|
||||||
success: self.saveSuccess,
|
|
||||||
error: self.saveError
|
|
||||||
}).then(function () {
|
|
||||||
self.saveSettings();
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
buttonClass: "button-save right",
|
buttonClass: "button-save right",
|
||||||
@ -298,12 +292,8 @@
|
|||||||
} else {
|
} else {
|
||||||
data[key] = this.$('.js-upload-target').attr('src');
|
data[key] = this.$('.js-upload-target').attr('src');
|
||||||
}
|
}
|
||||||
self.model.save(data, {
|
self.model.set(data);
|
||||||
success: self.saveSuccess,
|
self.saveUser(data);
|
||||||
error: self.saveError
|
|
||||||
}).then(function () {
|
|
||||||
self.saveUser();
|
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
buttonClass: "button-save right",
|
buttonClass: "button-save right",
|
||||||
|
Loading…
Reference in New Issue
Block a user