From d136ae0b762d563ae312c50cc11c735f7799b3a9 Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Wed, 13 Nov 2024 16:10:10 +0530 Subject: [PATCH] fix --- api/apiutil/transport/request.go | 3 ++- client/user.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/apiutil/transport/request.go b/api/apiutil/transport/request.go index 27b1065d..ab529434 100644 --- a/api/apiutil/transport/request.go +++ b/api/apiutil/transport/request.go @@ -21,7 +21,6 @@ import ( "container/list" "context" "fmt" - "github.com/go-errors/errors" "io" "mime/multipart" "net/http" @@ -34,6 +33,8 @@ import ( "sync" "time" + "github.com/go-errors/errors" + log "github.com/sirupsen/logrus" "github.com/go-openapi/runtime" diff --git a/client/user.go b/client/user.go index d7f0ca3e..c7cae33b 100644 --- a/client/user.go +++ b/client/user.go @@ -3,6 +3,7 @@ package client import ( "errors" "fmt" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" @@ -110,6 +111,7 @@ func (h *V1Client) GetUserByEmail(email string) (*models.V1User, error) { return nil, fmt.Errorf("user with email '%s' not found", email) } +// GetUserByID retrieves an existing user by ID. func (h *V1Client) GetUserByID(userUID string) (*models.V1User, error) { params := clientv1.NewV1UsersUIDGetParams().WithUID(userUID) resp, err := h.Client.V1UsersUIDGet(params)