service/app/mix/controller/websocket.go

17 lines
384 B
Go
Raw Permalink Normal View History

2023-12-21 22:17:40 +08:00
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)
}
}