Skip to content
Snippets Groups Projects
Commit b6a974db authored by Josh Brooks's avatar Josh Brooks
Browse files

Restore BackupReport to original glory

parent 1b98f362
Branches
Tags
2 merge requests!510Release,!302Restore BackupReport to original glory
...@@ -10,6 +10,7 @@ package bindings ...@@ -10,6 +10,7 @@ package bindings
import ( import (
"encoding/json" "encoding/json"
"gitlab.com/elixxir/client/backup" "gitlab.com/elixxir/client/backup"
"gitlab.com/xx_network/primitives/id"
) )
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -28,11 +29,11 @@ type Backup struct { ...@@ -28,11 +29,11 @@ type Backup struct {
// Example BackupReport: // Example BackupReport:
// {"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""} // {"BackupIdListJson":"WyJPRHRRTTA4ZERpV3lXaE0wWUhjanRHWnZQcHRSa1JOZ1pHR2FkTG10dE9BRCJd","BackupParams":""}
type BackupReport struct { type BackupReport struct {
// The JSON encoded list of E2E partner IDs // The list of restored E2E partner IDs
BackupIdListJson []byte RestoredContacts []*id.ID
// The backup parameters found within the backup file // The backup parameters found within the backup file
BackupParams string Params string
} }
// UpdateBackupFunc contains a function callback that returns new backups. // UpdateBackupFunc contains a function callback that returns new backups.
...@@ -68,16 +69,10 @@ func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string, ...@@ -68,16 +69,10 @@ func NewCmixFromBackup(ndfJSON, storageDir, backupPassphrase string,
return nil, err return nil, err
} }
// Marshal ID List
backupIdListJson, err := json.Marshal(backupIdList)
if err != nil {
return nil, err
}
// Construct report // Construct report
report := BackupReport{ report := BackupReport{
BackupIdListJson: backupIdListJson, RestoredContacts: backupIdList,
BackupParams: backupParams, Params: backupParams,
} }
// Marshal report // Marshal report
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment