mirror of
https://github.com/usememos/memos.git
synced 2025-04-13 17:12:07 +02:00
fix: can't change memo UID (#3621)
This commit is contained in:
parent
9b090d909e
commit
b923988fd6
@ -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…
x
Reference in New Issue
Block a user