mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 11:32:11 +08:00
DEV: Import MessageBus
from message-bus-client
instead of globals
This commit is contained in:
@ -2,6 +2,7 @@ import I18n from "I18n";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import EmberObject from "@ember/object";
|
||||
import MessageBus from "message-bus-client";
|
||||
|
||||
const Backup = EmberObject.extend({
|
||||
destroy() {
|
||||
@ -11,7 +12,7 @@ const Backup = EmberObject.extend({
|
||||
restore() {
|
||||
return ajax("/admin/backups/" + this.filename + "/restore", {
|
||||
type: "POST",
|
||||
data: { client_id: window.MessageBus.clientId }
|
||||
data: { client_id: MessageBus.clientId }
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -38,7 +39,7 @@ Backup.reopenClass({
|
||||
type: "POST",
|
||||
data: {
|
||||
with_uploads: withUploads,
|
||||
client_id: window.MessageBus.clientId
|
||||
client_id: MessageBus.clientId
|
||||
}
|
||||
}).then(result => {
|
||||
if (!result.success) {
|
||||
|
Reference in New Issue
Block a user