feat: add city/industry/company/personalityTags/birthday to userProfile transforms
This commit is contained in:
@@ -55,7 +55,12 @@ const transformToBackendFormat = (frontendData) => {
|
|||||||
childhood,
|
childhood,
|
||||||
joy,
|
joy,
|
||||||
low,
|
low,
|
||||||
future
|
future,
|
||||||
|
city,
|
||||||
|
industry,
|
||||||
|
company,
|
||||||
|
personalityTags,
|
||||||
|
birthday
|
||||||
} = frontendData
|
} = frontendData
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -79,7 +84,12 @@ const transformToBackendFormat = (frontendData) => {
|
|||||||
// 未来期许
|
// 未来期许
|
||||||
futureVision: future?.vision || null,
|
futureVision: future?.vision || null,
|
||||||
// 理想生活状态
|
// 理想生活状态
|
||||||
idealLife: future?.ideal || null
|
idealLife: future?.ideal || null,
|
||||||
|
city: city || null,
|
||||||
|
industry: industry || null,
|
||||||
|
company: company || null,
|
||||||
|
personalityTags: Array.isArray(personalityTags) ? JSON.stringify(personalityTags) : personalityTags,
|
||||||
|
birthday: birthday || null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +117,12 @@ export const transformToFrontendFormat = (backendData) => {
|
|||||||
valleyDate,
|
valleyDate,
|
||||||
valleyContent,
|
valleyContent,
|
||||||
futureVision,
|
futureVision,
|
||||||
idealLife
|
idealLife,
|
||||||
|
city,
|
||||||
|
industry,
|
||||||
|
company,
|
||||||
|
personalityTags,
|
||||||
|
birthday
|
||||||
} = backendData
|
} = backendData
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -139,7 +154,12 @@ export const transformToFrontendFormat = (backendData) => {
|
|||||||
future: {
|
future: {
|
||||||
vision: futureVision || '',
|
vision: futureVision || '',
|
||||||
ideal: idealLife || ''
|
ideal: idealLife || ''
|
||||||
}
|
},
|
||||||
|
city: city || '',
|
||||||
|
industry: industry || '',
|
||||||
|
company: company || '',
|
||||||
|
personalityTags: personalityTags ? (typeof personalityTags === 'string' ? JSON.parse(personalityTags) : personalityTags) : [],
|
||||||
|
birthday: birthday || ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user