memos/server/router/api
Claude ce835ca145
fix(api): implement custom memo ID support in CreateMemo
Fixes #5214

The CreateMemo and CreateMemoComment endpoints now respect the
optional memo_id and comment_id parameters as documented in the
API proto definitions.

Changes:
- Check if request.MemoId is provided when creating a memo
- Use custom memo ID if provided, otherwise generate UUID
- Validate uniqueness before creation to provide clear error messages
- Pass comment_id parameter in CreateMemoComment
- Existing UID validation via base.UIDMatcher ensures format compliance
- Database UNIQUE constraint on uid column prevents duplicates

The fix maintains backward compatibility - when memo_id is not
provided, the system continues to auto-generate UUIDs as before.
2025-11-08 01:21:32 +00:00
..
v1 fix(api): implement custom memo ID support in CreateMemo 2025-11-08 01:21:32 +00:00