Cleanup S3 support; send actual backup details in response

This commit is contained in:
Dane Everitt
2020-05-09 19:24:30 -07:00
parent 326b5b6554
commit 0bd28a4480
4 changed files with 42 additions and 41 deletions

View File

@@ -41,13 +41,15 @@ func (b *LocalBackup) Remove() error {
// Generates a backup of the selected files and pushes it to the defined location
// for this instance.
func (b *LocalBackup) Generate(included *IncludedFiles, prefix string) error {
func (b *LocalBackup) Generate(included *IncludedFiles, prefix string) (*ArchiveDetails, error) {
a := &Archive{
TrimPrefix: prefix,
Files: included,
}
err := a.Create(b.Path(), context.Background())
if err := a.Create(b.Path(), context.Background()); err != nil {
return nil, err
}
return err
return b.Details(), nil
}