mirror of
https://github.com/usememos/memos.git
synced 2024-12-29 00:21:52 +08:00
fix: can't change memo UID (#3621)
This commit is contained in:
parent
9b090d909e
commit
b923988fd6
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoR
|
||||||
payload.Property = property
|
payload.Property = property
|
||||||
update.Payload = payload
|
update.Payload = payload
|
||||||
} else if path == "uid" {
|
} else if path == "uid" {
|
||||||
update.UID = &request.Memo.Name
|
update.UID = &request.Memo.Uid
|
||||||
if !util.UIDMatcher.MatchString(*update.UID) {
|
if !util.UIDMatcher.MatchString(*update.UID) {
|
||||||
return nil, status.Errorf(codes.InvalidArgument, "invalid resource name")
|
return nil, status.Errorf(codes.InvalidArgument, "invalid resource name")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue