add management interface

pull/131/head v1.0.7
Gordon 3 years ago
parent 8987005e60
commit e63b3ab0e3

@ -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{}

Loading…
Cancel
Save