Loading server/console_api_explorer.go +9 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ import ( "reflect" "sort" "strings" "time" ) type MethodName string Loading Loading @@ -135,10 +136,12 @@ func (s *ConsoleServer) extractApiCallContext(ctx context.Context, in *console.C s.logger.Error("Error looking up user account.", zap.String("method", in.Method), zap.Error(err)) return nil, status.Error(codes.Internal, "Error looking up user account.") } callCtx = context.WithValue(context.WithValue(ctx, ctxUserIDKey{}, userUUID), ctxUsernameKey{}, dbUsername) callCtx = context.WithValue(ctx, ctxUserIDKey{}, userUUID) callCtx = context.WithValue(callCtx, ctxUsernameKey{}, dbUsername) callCtx = context.WithValue(callCtx, ctxVarsKey{}, map[string]string{}) callCtx = context.WithValue(callCtx, ctxExpiryKey{}, time.Now().Add(24*time.Hour).Unix()) } return callCtx, nil } func (s *ConsoleServer) ListApiEndpoints(ctx context.Context, _ *empty.Empty) (*console.ApiEndpointList, error) { Loading Loading
server/console_api_explorer.go +9 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ import ( "reflect" "sort" "strings" "time" ) type MethodName string Loading Loading @@ -135,10 +136,12 @@ func (s *ConsoleServer) extractApiCallContext(ctx context.Context, in *console.C s.logger.Error("Error looking up user account.", zap.String("method", in.Method), zap.Error(err)) return nil, status.Error(codes.Internal, "Error looking up user account.") } callCtx = context.WithValue(context.WithValue(ctx, ctxUserIDKey{}, userUUID), ctxUsernameKey{}, dbUsername) callCtx = context.WithValue(ctx, ctxUserIDKey{}, userUUID) callCtx = context.WithValue(callCtx, ctxUsernameKey{}, dbUsername) callCtx = context.WithValue(callCtx, ctxVarsKey{}, map[string]string{}) callCtx = context.WithValue(callCtx, ctxExpiryKey{}, time.Now().Add(24*time.Hour).Unix()) } return callCtx, nil } func (s *ConsoleServer) ListApiEndpoints(ctx context.Context, _ *empty.Empty) (*console.ApiEndpointList, error) { Loading