service/app/mix/controller/app_config_api.go

27 lines
671 B
Go
Raw Normal View History

2024-02-01 09:52:45 +08:00
package controller
import (
"service/api/errcode"
appconfigproto "service/api/proto/app_config/proto"
"service/app/mix/service"
"service/bizcommon/util"
"service/library/logger"
"github.com/gin-gonic/gin"
)
func ApiGetAppConfigListByKey(ctx *gin.Context) {
req := ctx.MustGet("client_req").(*appconfigproto.ApiListByKeyReq)
appconfig, ec := service.DefaultService.ApiGetAppConfigListByKey(ctx, req)
if ec != errcode.ErrCodeAppConfigSrvOk {
logger.Error("ApiGetAppConfigListByKey fail, req: %v, ec: %v", util.ToJson(req), ec)
ReplyErrCodeMsg(ctx, ec)
return
}
data := &appconfigproto.ApiListByKeyData{
AppConfig: appconfig,
}
ReplyOk(ctx, data)
}