fix(frontend): 修复 TypeScript 类型错误,与后端 API 响应结构对齐
- 修复 UserDTO 类型定义,字段改为非 nullable 类型 - 修复 PostMapper 使用正确的 snake_case 字段名 - 修复 UserMapper 移除不存在的 is_blocked 和 updated_at 字段 - 修复 MessageMapper 使用 segments 替代已移除的字段 - 修复 MessageSyncService 正确处理 API 响应类型 - 修复 LocalDataSource SQLite 参数类型问题 - 修复导航相关类型错误 - 修复 PostDetailScreen 和 EditProfileScreen 的 null/undefined 类型不匹配
This commit is contained in:
@@ -225,11 +225,11 @@ export const EditProfileScreen: React.FC = () => {
|
||||
if (updatedUser) {
|
||||
updateUser({
|
||||
nickname: nickname.trim(),
|
||||
bio: bio.trim() || null,
|
||||
location: location.trim() || null,
|
||||
website: website.trim() || null,
|
||||
phone: phone.trim() || null,
|
||||
email: email.trim() || null,
|
||||
bio: bio.trim() || undefined,
|
||||
location: location.trim() || undefined,
|
||||
website: website.trim() || undefined,
|
||||
phone: phone.trim() || undefined,
|
||||
email: email.trim() || undefined,
|
||||
});
|
||||
|
||||
Alert.alert('成功', '资料已更新', [
|
||||
|
||||
Reference in New Issue
Block a user