From e808c14a73bf9b3203c5fb080a3f719a5a43a5e3 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 9 Oct 2024 08:46:43 +0800 Subject: [PATCH] Fix the response type of create bookmark in go client (#28574) --- server/public/model/client4.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/public/model/client4.go b/server/public/model/client4.go index 15815f8d4b..ca1163a99f 100644 --- a/server/public/model/client4.go +++ b/server/public/model/client4.go @@ -9112,7 +9112,7 @@ func (c *Client4) CheckCWSConnection(ctx context.Context, userId string) (*Respo } // CreateChannelBookmark creates a channel bookmark based on the provided struct. -func (c *Client4) CreateChannelBookmark(ctx context.Context, channelBookmark *ChannelBookmark) (*ChannelBookmark, *Response, error) { +func (c *Client4) CreateChannelBookmark(ctx context.Context, channelBookmark *ChannelBookmark) (*ChannelBookmarkWithFileInfo, *Response, error) { channelBookmarkJSON, err := json.Marshal(channelBookmark) if err != nil { return nil, nil, NewAppError("CreateChannelBookmark", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err) @@ -9122,7 +9122,7 @@ func (c *Client4) CreateChannelBookmark(ctx context.Context, channelBookmark *Ch return nil, BuildResponse(r), err } defer closeBody(r) - var cb ChannelBookmark + var cb ChannelBookmarkWithFileInfo if err := json.NewDecoder(r.Body).Decode(&cb); err != nil { return nil, nil, NewAppError("CreateChannelBookmark", "api.unmarshal_error", nil, "", http.StatusInternalServerError).Wrap(err) }