mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 10:09:54 +08:00
优化服务退出流程,增加中间件文档
This commit is contained in:
@@ -20,9 +20,9 @@ func (s *sHook) accessLog(r *ghttp.Request) {
|
||||
if r.IsFileRequest() {
|
||||
return
|
||||
}
|
||||
|
||||
var ctx = contexts.Detach(r.Context())
|
||||
modelCtx := contexts.Get(ctx)
|
||||
if modelCtx == nil {
|
||||
if contexts.Get(ctx) == nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -79,7 +79,6 @@ func (s *sHook) lastAdminActive(r *ghttp.Request) {
|
||||
_, err := g.Model("admin_member").
|
||||
Ctx(ctx).
|
||||
Where("id", member.Id).
|
||||
WhereLT("last_active_at", gtime.Now()).
|
||||
Data(g.Map{"last_active_at": gtime.Now()}).
|
||||
Update()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user