service/app/mix/controller/websocket.go

17 lines
384 B
Go

package controller
import (
"github.com/gin-gonic/gin"
"service/api/errcode"
"service/app/mix/service"
"service/library/logger"
)
func HandleWs(ctx *gin.Context) {
err := service.DefaultService.GetDefaultMelody().HandleRequest(ctx.Writer, ctx.Request)
if err != nil {
logger.Error("HandleRequest fail, err: %v", err)
ReplyErrCodeMsg(ctx, errcode.ErrCodeHandleWsFail)
}
}