mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 14:36:28 +08:00
22 lines
432 B
JavaScript
22 lines
432 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");
|
|
},
|
|
});
|