From 654dc38be7a3634849072a62e62c4b39605d84a4 Mon Sep 17 00:00:00 2001 From: Jiayuan Chen Date: Fri, 19 Jan 2024 15:01:10 -0800 Subject: [PATCH] fix: Set ManagedById when creating or updating a filedrop (#99) --- client/api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/api.go b/client/api.go index 4ce53e0e..cad3606e 100644 --- a/client/api.go +++ b/client/api.go @@ -1198,6 +1198,9 @@ func (c *Client) CreateFiledrop(ctx context.Context, workspaceId string, datastr c.obs2110.Lock() defer c.obs2110.Unlock() } + if c.Config.ManagingObjectID != nil { + input.ManagedById = c.Config.ManagingObjectID + } result, err := c.Meta.CreateFiledrop(ctx, workspaceId, datastreamId, input) if err != nil { return nil, err @@ -1211,6 +1214,9 @@ func (c *Client) UpdateFiledrop(ctx context.Context, id string, input *meta.File c.obs2110.Lock() defer c.obs2110.Unlock() } + if c.Config.ManagingObjectID != nil { + input.ManagedById = c.Config.ManagingObjectID + } result, err := c.Meta.UpdateFiledrop(ctx, id, input) if err != nil { return nil, err