mirror of
https://github.com/acepanel/panel.git
synced 2026-02-06 18:47:31 +08:00
refactor: 重构 tools.Remove 函数
This commit is contained in:
@@ -235,7 +235,9 @@ func (r *CronController) Delete(ctx http.Context) http.Response {
|
||||
if err := r.cron.DeleteFromSystem(cron); err != nil {
|
||||
return Error(ctx, http.StatusInternalServerError, err.Error())
|
||||
}
|
||||
tools.Remove(cron.Shell)
|
||||
if err := tools.Remove(cron.Shell); err != nil {
|
||||
return Error(ctx, http.StatusInternalServerError, err.Error())
|
||||
}
|
||||
|
||||
if _, err := facades.Orm().Query().Delete(&cron); err != nil {
|
||||
facades.Log().Request(ctx.Request()).Tags("面板", "计划任务").With(map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user