Update output from socket to use checksum

This commit is contained in:
Dane Everitt 2020-08-23 18:06:17 -07:00
parent 7287b8e198
commit 3489088703
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -97,7 +97,8 @@ func (s *Server) Backup(b backup.BackupInterface) error {
s.Events().PublishJson(BackupCompletedEvent+":"+b.Identifier(), map[string]interface{}{
"uuid": b.Identifier(),
"is_successful": false,
"sha256_hash": "",
"checksum": "",
"checksum_type": "sha1",
"file_size": 0,
})
@ -117,7 +118,8 @@ func (s *Server) Backup(b backup.BackupInterface) error {
s.Events().PublishJson(BackupCompletedEvent+":"+b.Identifier(), map[string]interface{}{
"uuid": b.Identifier(),
"is_successful": true,
"sha256_hash": ad.Checksum,
"checksum": ad.Checksum,
"checksum_type": "sha1",
"file_size": ad.Size,
})