discourse/app/assets/javascripts/admin/routes/admin-backups-index.js.es6

18 lines
367 B
Plaintext
Raw Normal View History

2018-06-15 11:03:24 -04:00
import Backup from "admin/models/backup";
export default Ember.Route.extend({
2018-01-31 06:05:06 -05:00
activate() {
2018-06-15 11:03:24 -04:00
this.messageBus.subscribe("/admin/backups", backups =>
this.controller.set("model", backups.map(backup => Backup.create(backup)))
2018-06-15 11:03:24 -04:00
);
2018-01-31 06:05:06 -05:00
},
model() {
return Backup.find();
2018-01-31 06:05:06 -05:00
},
deactivate() {
this.messageBus.unsubscribe("/admin/backups");
}
});