Pārlūkot izejas kodu

用户注销操作接口

master
huangjiajun pirms 1 nedēļas
vecāks
revīzija
2958e942a1
1 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +5
    -2
      app/hdl/hdl_user.go

+ 5
- 2
app/hdl/hdl_user.go Parādīt failu

@@ -5,9 +5,11 @@ import (
"applet/app/e"
"applet/app/es/hdl"
md2 "applet/app/es/md"
"applet/app/lib/auth"
"applet/app/md"
"applet/app/svc"
"applet/app/utils"
"applet/app/utils/cache"
"applet/app/utils/qrcode"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
@@ -16,6 +18,7 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"context"
"fmt"
"github.com/gin-gonic/gin"
"github.com/olivere/elastic/v7"
"github.com/syyongx/php2go"
@@ -365,8 +368,8 @@ func Delete(c *gin.Context) {
}
}
// 清掉token
//cacheKey := fmt.Sprintf(auth.TokenKey, user.Id)
//_, err = cache.SetEx(cacheKey, "", 1)
cacheKey := fmt.Sprintf(auth.TokenKey, user.Id)
_, err = cache.SetEx(cacheKey, "", 1)
e.OutSuc(c, "success", nil)
return
}

Notiek ielāde…
Atcelt
Saglabāt