修复file上传未设置到用户
This commit is contained in:
parent
05e40343b5
commit
4b61e7102e
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue