fix(router): 修改权限检查的返回值关键字
This commit is contained in:
parent
def02d4e3a
commit
803332d69d
2 changed files with 5 additions and 5 deletions
|
@ -15,8 +15,8 @@ var (
|
|||
)
|
||||
|
||||
func loadConfig() {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
// mu.Lock()
|
||||
// defer mu.Unlock()
|
||||
|
||||
if _, err := toml.DecodeFile("config.toml", &config); err != nil {
|
||||
panic(err)
|
||||
|
@ -24,8 +24,8 @@ func loadConfig() {
|
|||
|
||||
}
|
||||
func GetConfig() map[string]interface{} {
|
||||
// mu.Lock()
|
||||
// defer mu.Unlock()
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
// print(config)
|
||||
if config == nil {
|
||||
loadConfig()
|
||||
|
|
|
@ -36,7 +36,7 @@ func Router(data map[string]interface{}) {
|
|||
// fmt.Println("CheckPermission:", worker.CheckPermission())
|
||||
// ans := NewStdAns(parms[0], fmt.Sprintf("%d", int(uid)), fmt.Sprintf("%d", int(gid)), role, fmt.Sprintf("%d", int(mid)), raw_msg)
|
||||
message := worker.CheckPermission()
|
||||
if message == "0" {
|
||||
if message == "ok" {
|
||||
message = worker.GetMsg()
|
||||
worker.SendMsg(message)
|
||||
|
||||
|
|
Loading…
Reference in a new issue