Fix topic handling for websocket with namespace

This commit is contained in:
Dane Everitt
2020-04-06 21:22:43 -07:00
parent 222091b68c
commit 33875105b6
3 changed files with 20 additions and 5 deletions

View File

@@ -172,10 +172,10 @@ func (b *Backup) BackupAndNotify() error {
// Emit an event over the socket so we can update the backup in realtime on
// the frontend for the server.
b.server.Events().PublishJson(BackupCompletedEvent, map[string]interface{}{
"uuid": b.Uuid,
b.server.Events().PublishJson(BackupCompletedEvent+":"+b.Uuid, map[string]interface{}{
"uuid": b.Uuid,
"sha256_hash": resp.Sha256Hash,
"file_size": resp.FileSize,
"file_size": resp.FileSize,
})
return nil