|
|
@ -9,6 +9,7 @@ import (
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func SetClientInitConfig(c *gin.Context) {
|
|
|
|
func SetClientInitConfig(c *gin.Context) {
|
|
|
@ -61,8 +62,11 @@ func GetClientInitConfig(c *gin.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
config, err := imdb.GetClientInitConfig()
|
|
|
|
config, err := imdb.GetClientInitConfig()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
|
|
|
|
if !gorm.IsRecordNotFoundError(err) {
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
resp.Data.DiscoverPageURL = config.DiscoverPageURL
|
|
|
|
resp.Data.DiscoverPageURL = config.DiscoverPageURL
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp)
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp)
|
|
|
|