mirror of
https://github.com/usememos/memos.git
synced 2024-12-29 16:42:11 +08:00
fix: fix deleting tag from tag lists (#3311)
This commit is contained in:
parent
e32a585bbf
commit
56ceba2dec
2 changed files with 2 additions and 7 deletions
|
@ -137,13 +137,7 @@ func (s *APIV1Service) RenameTag(ctx context.Context, request *v1pb.RenameTagReq
|
|||
}
|
||||
|
||||
func (s *APIV1Service) DeleteTag(ctx context.Context, request *v1pb.DeleteTagRequest) (*emptypb.Empty, error) {
|
||||
userID, err := ExtractUserIDFromName(request.Tag.Creator)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
}
|
||||
user, err := s.Store.GetUser(ctx, &store.FindUser{
|
||||
ID: &userID,
|
||||
})
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain
|
|||
dialogName: "delete-tag-dialog",
|
||||
onConfirm: async () => {
|
||||
await tagStore.deleteTag(tag.text);
|
||||
tagStore.fetchTags({ skipCache: true });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue