提交 e63b3ab0 编写于 作者: programor_guo's avatar programor_guo

add management interface

上级 8987005e
......@@ -5,14 +5,13 @@ import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"bytes"
"encoding/json"
"fmt"
"github.com/gin-gonic/gin"
"io/ioutil"
"net/http"
"github.com/gin-gonic/gin"
"github.com/spf13/viper"
)
type ParamsLogin struct {
......@@ -89,7 +88,7 @@ func Login(c *gin.Context) {
}
func OpenIMToken(Account string, platform int32) (*http.Response, error) {
url := fmt.Sprintf("http://%s:10000/auth/user_token", viper.GetString("endpoints.api"))
url := fmt.Sprintf("http://%s:10000/auth/user_token", utils.ServerIP)
client := &http.Client{}
params := make(map[string]interface{})
......
......@@ -6,15 +6,14 @@ import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"github.com/garyburd/redigo/redis"
"github.com/gin-gonic/gin"
"github.com/spf13/viper"
"io/ioutil"
"net/http"
)
type ParamsSetPassword struct {
......@@ -120,7 +119,7 @@ openIMRegisterTab:
}
func OpenIMRegister(account string) (*http.Response, error) {
url := fmt.Sprintf("http://%s:10000/auth/user_register", viper.GetString("endpoints.api"))
url := fmt.Sprintf("http://%s:10000/auth/user_register", utils.ServerIP)
fmt.Println("1:", config.Config.Secret)
client := &http.Client{}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册