fix
This commit is contained in:
@@ -83,7 +83,11 @@ func (h *Media) DeleteMany(c *gin.Context) {
|
||||
httpx.Write(c, httpx.CodeSuccess, gin.H{}, "批量删除成功")
|
||||
}
|
||||
func (h *Media) Find(c *gin.Context) {
|
||||
id, _ := strconv.ParseUint(c.Query("id"), 10, 64)
|
||||
id, parseErr := strconv.ParseUint(c.Query("id"), 10, 64)
|
||||
if parseErr != nil {
|
||||
httpx.Fail(c, "文件ID非法")
|
||||
return
|
||||
}
|
||||
item, err := h.service.Media(c.Request.Context(), uint(id))
|
||||
if err != nil {
|
||||
httpx.Fail(c, "查询失败")
|
||||
|
||||
Reference in New Issue
Block a user