mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fix loss of private settings when saving in certain circumstances
no issue - always ensure we load a full settings object so that we don't risk saving a partial settings object back to the server - should fix the issues reported in Slack of disappearing private settings over time
This commit is contained in:
parent
fe521bec78
commit
5e80039587
4 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|||
},
|
||||
|
||||
model() {
|
||||
return this.store.query('setting', {type: 'blog,theme'}).then((records) => {
|
||||
return this.store.query('setting', {type: 'blog,theme,private'}).then((records) => {
|
||||
return records.get('firstObject');
|
||||
});
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@ export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|||
},
|
||||
|
||||
model() {
|
||||
return this.store.query('setting', {type: 'blog,theme'}).then((records) => {
|
||||
return this.store.query('setting', {type: 'blog,theme,private'}).then((records) => {
|
||||
return records.get('firstObject');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|||
},
|
||||
|
||||
model() {
|
||||
return this.store.query('setting', {type: 'blog,theme'}).then((records) => {
|
||||
return this.store.query('setting', {type: 'blog,theme,private'}).then((records) => {
|
||||
return records.get('firstObject');
|
||||
});
|
||||
},
|
||||
|
|
|
@ -46,7 +46,7 @@ export default Service.extend({
|
|||
}),
|
||||
|
||||
fetch() {
|
||||
return this.get('store').queryRecord('setting', {type: 'blog'}).then((settings) => {
|
||||
return this.get('store').queryRecord('setting', {type: 'blog,theme,private'}).then((settings) => {
|
||||
this.set('_settings', settings);
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue