refactor: add GetAdminToken interface. (#2684)

* refactor: add GetAdminToken interface.

* update config.
This commit is contained in:
Monet Lee
2024-09-29 16:20:34 +08:00
committed by GitHub
parent 765fa17e7a
commit 5452741af8
8 changed files with 21 additions and 19 deletions
+3 -2
View File
@@ -21,7 +21,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"github.com/openimsdk/tools/errs"
"io"
"log"
"net/http"
@@ -34,6 +33,8 @@ import (
"sync/atomic"
"time"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/protocol/third"
)
@@ -95,7 +96,7 @@ func (m *Manage) Run() error {
}
var err error
ctx := context.WithValue(m.ctx, "operationID", fmt.Sprintf("%s_init", m.prefix))
m.api.Token, err = m.api.GetToken(ctx)
m.api.Token, err = m.api.GetAdminToken(ctx)
if err != nil {
return err
}