refactor: retire memo uid

This commit is contained in:
johnnyjoy
2025-02-01 11:28:07 +08:00
parent b0119f320a
commit 98aa0b73c5
8 changed files with 375 additions and 387 deletions

View File

@@ -61,8 +61,9 @@ func ExtractUserIDFromName(name string) (int32, error) {
return id, nil
}
// ExtractMemoIDFromName returns the memo ID from a resource name.
func ExtractMemoIDFromName(name string) (string, error) {
// ExtractMemoUIDFromName returns the memo UID from a resource name.
// e.g., "memos/uuid" -> "uuid"
func ExtractMemoUIDFromName(name string) (string, error) {
tokens, err := GetNameParentTokens(name, MemoNamePrefix)
if err != nil {
return "", err