mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 00:43:24 +08:00
8b10fc2f8c
Fix for `admin-user.js` and `backup.js` models.
24 lines
509 B
JavaScript
24 lines
509 B
JavaScript
import Backup from "admin/models/backup";
|
|
import Route from "@ember/routing/route";
|
|
|
|
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().then((backups) =>
|
|
backups.map((backup) => Backup.create(backup))
|
|
);
|
|
},
|
|
|
|
deactivate() {
|
|
this.messageBus.unsubscribe("/admin/backups");
|
|
},
|
|
});
|