提交 da5e60a0 编写于 作者: W wenxu12345

Refactor code

上级 b90bb10a
......@@ -167,6 +167,7 @@ func GetGroupAllMemberList(c *gin.Context) {
func GetJoinedGroupList(c *gin.Context) {
params := api.GetJoinedGroupListReq{}
err := c.BindJSON(&params)
if err := c.BindJSON(&params); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
......
......@@ -90,7 +90,7 @@ type CreateGroupReq struct {
}
type CreateGroupResp struct {
CommResp
GroupInfo open_im_sdk.GroupInfo `jason:-`
GroupInfo open_im_sdk.GroupInfo `json:-`
Data map[string]interface{} `json:"data"`
}
......
......@@ -44,7 +44,7 @@ func initMysqlDB() {
db.Close()
dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName+"test1")
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName)
db, err = gorm.Open("mysql", dsn)
if err != nil {
log.NewError("0", "Open failed ", err.Error(), dsn)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册