mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
gorm日志支持显示requestId
This commit is contained in:
@@ -6,6 +6,6 @@ import (
|
||||
)
|
||||
|
||||
func WithContextDb(c *gin.Context) {
|
||||
c.Set("db", sdk.Runtime.GetDbByKey(c.Request.Host))
|
||||
c.Set("db", sdk.Runtime.GetDbByKey(c.Request.Host).WithContext(c))
|
||||
c.Next()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user