service/app/mix/controller/feedback_api.go

24 lines
569 B
Go
Raw Permalink Normal View History

2023-12-21 22:17:40 +08:00
package controller
import (
"service/api/errcode"
feedbackproto "service/api/proto/feedback/proto"
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"github.com/gin-gonic/gin"
)
func ApiCreateFeedback(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*feedbackproto.ApiCreateReq)
ec := service.DefaultService.ApiCreateFeedback(ctx, req)
if ec != errcode.ErrCodeFeedbackSrvOk {
logger.Error("OpCreateFeedback fail, req: %v, ec: %v", util.ToJson(req), ec)
ReplyErrorMsg(ctx, "server error")
return
}
ReplyOk(ctx, nil)
}