修改功能查找接口
This commit is contained in:
parent
d1a2ab79c9
commit
5bb65f7d42
|
|
@ -53,15 +53,13 @@ func FindFuncModel(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": funcModels})
|
||||
} else if req.ModelID != 0 {
|
||||
} else {
|
||||
funcModels, err3 := service.FindFuncModelByUserID(userID)
|
||||
if err3 != nil {
|
||||
c.JSON(http.StatusOK, gin.H{"error": err3.Error(), "code": proto.FuncModelSearchFailed, "message": "failed"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": funcModels})
|
||||
} else {
|
||||
c.JSON(http.StatusOK, gin.H{"error": "type error", "code": proto.FuncModelSearchFailed, "message": "failed"})
|
||||
}
|
||||
} else {
|
||||
c.JSON(http.StatusOK, gin.H{"error": err.Error(), "code": proto.ParameterError, "message": "failed"})
|
||||
|
|
|
|||
Loading…
Reference in New Issue