| | |
| | | "errors" |
| | | "github.com/gin-gonic/gin" |
| | | "gorm.io/gorm" |
| | | "os" |
| | | "path" |
| | | "speechAnalysis/constvar" |
| | | "speechAnalysis/extend/code" |
| | |
| | | return |
| | | } |
| | | |
| | | go func() { |
| | | err = os.Remove(audio.FilePath) |
| | | if err != nil { |
| | | logx.Warnf("remove file err:%v, file:%v", err, audio.FilePath) |
| | | } |
| | | }() |
| | | |
| | | util.ResponseFormat(c, code.DeleteSuccess, "成功") |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | go func() { |
| | | for _, audio := range audioList { |
| | | err = os.Remove(audio.FilePath) |
| | | if err != nil { |
| | | logx.Warnf("remove file err:%v, file:%v", err, audio.FilePath) |
| | | } |
| | | } |
| | | }() |
| | | |
| | | util.ResponseFormat(c, code.DeleteSuccess, "成功") |
| | | } |
| | | |