Update middleware logic

This commit is contained in:
Dane Everitt
2020-12-15 20:19:09 -08:00
parent 84c05efaa5
commit acd6dc62d0
10 changed files with 175 additions and 77 deletions

View File

@@ -34,7 +34,7 @@ func postServerBackup(c *gin.Context) {
}
if err != nil {
TrackedServerError(err, s).AbortWithServerError(c)
TrackedServerError(err, s).Abort(c)
return
}
@@ -63,7 +63,7 @@ func deleteServerBackup(c *gin.Context) {
return
}
TrackedServerError(err, s).AbortWithServerError(c)
TrackedServerError(err, s).Abort(c)
return
}
@@ -72,7 +72,7 @@ func deleteServerBackup(c *gin.Context) {
// the backup previously and it is now missing when we go to delete, just treat it as having
// been successful, rather than returning a 404.
if !errors.Is(err, os.ErrNotExist) {
TrackedServerError(err, s).AbortWithServerError(c)
TrackedServerError(err, s).Abort(c)
return
}
}