From 9838088185a99f3e4fea0376639bda5657ea828c Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 3 Mar 2021 14:43:31 +0000 Subject: [PATCH] update metadata appropriately --- posts/handler/posts.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/posts/handler/posts.go b/posts/handler/posts.go index 69ccf10..4fd483f 100644 --- a/posts/handler/posts.go +++ b/posts/handler/posts.go @@ -93,10 +93,7 @@ func (p *Posts) Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.Sav } // merge the metadata - for k, v := range oldPost.Metadata { - if _, ok := post.Metadata[k]; ok { - continue - } + for k, v := range req.Metadata { post.Metadata[k] = v }