discourse/app/assets/javascripts/admin/routes/admin-backups-index.js
2020-03-13 17:03:08 -04:00

22 lines
427 B
JavaScript

import Route from "@ember/routing/route";
import Backup from "admin/models/backup";
export default Route.extend({
activate() {
this.messageBus.subscribe("/admin/backups", backups =>
this.controller.set(
"model",
backups.map(backup => Backup.create(backup))
)
);
},
model() {
return Backup.find();
},
deactivate() {
this.messageBus.unsubscribe("/admin/backups");
}
});