From 5e3ed201b46c29a3cae50ca9593e52f98c0f9758 Mon Sep 17 00:00:00 2001 From: Johnny Date: Mon, 8 Jul 2024 08:50:38 +0800 Subject: [PATCH] fix: update mask of update memo (#3659) --- server/router/api/v1/memo_service.go | 4 ++-- web/src/components/MemoEditor/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go index 05e5f218..15367e1d 100644 --- a/server/router/api/v1/memo_service.go +++ b/server/router/api/v1/memo_service.go @@ -271,10 +271,10 @@ func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoR } else if path == "row_status" { rowStatus := convertRowStatusToStore(request.Memo.RowStatus) update.RowStatus = &rowStatus - } else if path == "created_ts" { + } else if path == "create_time" { createdTs := request.Memo.CreateTime.AsTime().Unix() update.CreatedTs = &createdTs - } else if path == "display_ts" { + } else if path == "display_time" { displayTs := request.Memo.DisplayTime.AsTime().Unix() memoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx) if err != nil { diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 22daa44e..be40d3b2 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -289,7 +289,7 @@ const MemoEditor = (props: Props) => { if (prevMemo) { const updateMask = ["content", "visibility"]; if (props.memoPatchRef?.current?.displayTime) { - updateMask.push("display_ts"); + updateMask.push("display_time"); } const memo = await memoStore.updateMemo( {