diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/handler/file.go b/handler/file.go index a66ec15..397d64d 100644 --- a/handler/file.go +++ b/handler/file.go @@ -259,7 +259,7 @@ func UploadFileV2(c *gin.Context) { } //添加用户文件 fileAuth := service.CreateUserFile(id1, file_record.FileName, int(file_record.ID), uploadType) - if fileAuth.ID != 0 { + if fileAuth.ID == 0 { c.JSON(http.StatusOK, gin.H{"error": "save user file info failed", "code": proto.SaveFileInfoFailed, "message": "failed"}) return }