fix(server): use UserMetadataKey enum instead of string (#20209)

* fix(server): use UserMetadataKey enum instead of string

* fix: mobile
This commit is contained in:
Daimolean
2025-07-25 23:04:28 +08:00
committed by GitHub
parent ed5759fe07
commit 25e2d37490
11 changed files with 129 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ class SyncUserMetadataV1 {
required this.value,
});
String key;
UserMetadataKey key;
String userId;
@@ -57,7 +57,7 @@ class SyncUserMetadataV1 {
final json = value.cast<String, dynamic>();
return SyncUserMetadataV1(
key: mapValueOfType<String>(json, r'key')!,
key: UserMetadataKey.fromJson(json[r'key'])!,
userId: mapValueOfType<String>(json, r'userId')!,
value: mapValueOfType<Object>(json, r'value')!,
);