mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fixes some Ember Deprecations for 1.13:
- Remove ArrayController
- Remove {{view}} from templates
- Replace many cases of needs: [‘controller’] with inject
- Enable Ember Legacy Views
This commit is contained in:
@@ -2,7 +2,6 @@ import { ajax } from 'discourse/lib/ajax';
|
||||
import PreloadStore from 'preload-store';
|
||||
|
||||
const Backup = Discourse.Model.extend({
|
||||
|
||||
destroy() {
|
||||
return ajax("/admin/backups/" + this.get("filename"), { type: "DELETE" });
|
||||
},
|
||||
@@ -13,11 +12,9 @@ const Backup = Discourse.Model.extend({
|
||||
data: { client_id: window.MessageBus.clientId }
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Backup.reopenClass({
|
||||
|
||||
find() {
|
||||
return PreloadStore.getAndRemove("backups", () => ajax("/admin/backups.json"))
|
||||
.then(backups => backups.map(backup => Backup.create(backup)));
|
||||
|
||||
Reference in New Issue
Block a user