mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix deprecations with site text, upgrade to ES6 / store
This commit is contained in:
@@ -21,7 +21,7 @@ export default {
|
||||
this.route('show', {path: '/:site_customization_id/:section'});
|
||||
});
|
||||
|
||||
this.resource('adminSiteText', { path: '/site_text' }, function() {
|
||||
this.resource('adminSiteText', { path: '/site_texts' }, function() {
|
||||
this.route('edit', {path: '/:text_type'});
|
||||
});
|
||||
this.resource('adminUserFields', { path: '/user_fields' });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return Discourse.SiteText.find(params.text_type);
|
||||
model(params) {
|
||||
return this.store.find('site-text', params.text_type);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default Discourse.Route.extend({
|
||||
model: function() {
|
||||
return Discourse.SiteTextType.findAll();
|
||||
model() {
|
||||
return this.store.findAll('site-text-type');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user