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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
509 B
JavaScript
Raw Normal View History

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