From b2df2c014791143245a072a97538eaa9e9f6b8ba Mon Sep 17 00:00:00 2001 From: Mo Firouz Date: Wed, 3 Oct 2018 14:38:31 +0100 Subject: [PATCH] Encode uuid in cursor storage instead of byte slice --- server/core_storage.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/core_storage.go b/server/core_storage.go index d16d438d6..fedddaeab 100644 --- a/server/core_storage.go +++ b/server/core_storage.go @@ -23,6 +23,7 @@ import ( "fmt" "context" + "github.com/cockroachdb/cockroach-go/crdb" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/timestamp" @@ -34,7 +35,7 @@ import ( type storageCursor struct { Key string - UserID []byte + UserID uuid.UUID Read int32 } @@ -286,7 +287,7 @@ func storageListObjects(rows *sql.Rows, cursor string) (*api.StorageObjectList, } if lastObject.UserId != "" { - newCursor.UserID = uuid.FromStringOrNil(lastObject.UserId).Bytes() + newCursor.UserID = uuid.FromStringOrNil(lastObject.UserId) } cursorBuf := new(bytes.Buffer) -- GitLab