diff --git a/api/service/Question.go b/api/service/Question.go index 449e8e9..0e23314 100644 --- a/api/service/Question.go +++ b/api/service/Question.go @@ -34,7 +34,7 @@ func (r *QuestionService) AddQuestion(req requests.AddQuestion) (bool, error) { // 验证二级标签 var secondLabelId int64 if req.SecondLabelId != "" { - secondLabelId, err := strconv.ParseInt(req.SecondLabelId, 10, 64) + secondLabelId, err = strconv.ParseInt(req.SecondLabelId, 10, 64) if err != nil { return false, err }