2024-04-04 21:03:32 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"service/api/errcode"
|
|
|
|
zonesessionproto "service/api/proto/zonesession/proto"
|
|
|
|
"service/app/mix/service"
|
|
|
|
"service/bizcommon/util"
|
|
|
|
"service/library/logger"
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
2024-04-16 07:41:52 +08:00
|
|
|
func ApiUpsertZoneSession(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*zonesessionproto.ApiUpsertReq)
|
|
|
|
ec := service.DefaultService.ApiUpsertZoneSession(ctx, req)
|
2024-04-04 21:03:32 +08:00
|
|
|
if ec != errcode.ErrCodeZoneSessionSrvOk {
|
2024-04-16 07:41:52 +08:00
|
|
|
logger.Error("ApiUpsertZoneSession fail, req: %v, ec: %v", util.ToJson(req), ec)
|
2024-04-04 21:03:32 +08:00
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
ReplyOk(ctx, nil)
|
|
|
|
}
|