This commit is contained in:
wangchuxiao
2022-08-21 22:28:10 +08:00
parent d57729d3d7
commit 782ad07940
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -9,6 +9,7 @@ import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
)
func SetClientInitConfig(c *gin.Context) {
@@ -61,8 +62,11 @@ func GetClientInitConfig(c *gin.Context) {
}
config, err := imdb.GetClientInitConfig()
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
if !gorm.IsRecordNotFoundError(err) {
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
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp ", resp)