Merge branch 'dane/api-cleanup' into develop

This commit is contained in:
Dane Everitt
2021-02-23 21:25:10 -08:00
35 changed files with 616 additions and 1016 deletions

View File

@@ -15,6 +15,7 @@ import (
// Handle a download request for a server backup.
func getDownloadBackup(c *gin.Context) {
client := middleware.ExtractApiClient(c)
manager := middleware.ExtractManager(c)
token := tokens.BackupPayload{}
@@ -31,7 +32,7 @@ func getDownloadBackup(c *gin.Context) {
return
}
b, st, err := backup.LocateLocal(token.BackupUuid)
b, st, err := backup.LocateLocal(client, token.BackupUuid)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
c.AbortWithStatusJSON(http.StatusNotFound, gin.H{