perf: refactor

This commit is contained in:
ryan
2026-06-20 09:46:24 +08:00
parent 080be1e03a
commit cac6e88bc0
8 changed files with 244 additions and 120 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ func DownloadFile(c *gin.Context) {
upload, err := filesrv.GetUploadRecordByID(c)
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
c.AbortWithStatus(http.StatusNotFound)
response.AbortNotFound(c, "文件记录未找到")
return
}
if _, ok := err.(*strconv.NumError); ok {