mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 22:07:16 +08:00
refactor: 重构 tools.Remove 函数
This commit is contained in:
@@ -489,7 +489,9 @@ func (r *Postgresql15Controller) DeleteBackup(ctx http.Context) http.Response {
|
||||
|
||||
backupPath := r.setting.Get(models.SettingKeyBackupPath) + "/postgresql"
|
||||
fileName := ctx.Request().Input("name")
|
||||
tools.Remove(backupPath + "/" + fileName)
|
||||
if err := tools.Remove(backupPath + "/" + fileName); err != nil {
|
||||
return controllers.Error(ctx, http.StatusInternalServerError, err.Error())
|
||||
}
|
||||
|
||||
return controllers.Success(ctx, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user