Revert "优化服务退出流程,增加中间件文档"

This reverts commit c511a2e6b3.
This commit is contained in:
maxbad
2023-05-15 23:15:17 +08:00
parent c981d0b8eb
commit 64ed43b7ca
30 changed files with 98 additions and 336 deletions

View File

@@ -20,9 +20,9 @@ func (s *sHook) accessLog(r *ghttp.Request) {
if r.IsFileRequest() {
return
}
var ctx = contexts.Detach(r.Context())
if contexts.Get(ctx) == nil {
modelCtx := contexts.Get(ctx)
if modelCtx == nil {
return
}

View File

@@ -79,6 +79,7 @@ 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 {