mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Stop using string keys in contexts
This commit is contained in:
parent
6c0dcc126e
commit
c07727548d
1 changed files with 4 additions and 1 deletions
|
|
@ -1637,7 +1637,10 @@ func NewGRPCServer(opts ...grpcServerOption) (*grpcServer, error) {
|
|||
|
||||
// LogQuery logs requests
|
||||
func LogQuery(ctx context.Context, method string, req interface{}, logger logger.Logger) {
|
||||
uinfo, _ := ctx.Value("userinfo").(*authn.UserInfo)
|
||||
uinfo, ok := authn.GetUserInfo(ctx)
|
||||
if !ok {
|
||||
uinfo = &authn.UserInfo{}
|
||||
}
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
p, ok := peer.FromContext(ctx)
|
||||
ip := ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue