Updates to profile
This commit is contained in:
parent
1b8dacf92a
commit
970b185151
16 changed files with 652 additions and 1585 deletions
|
|
@ -34,11 +34,8 @@ export default defineEventHandler(async (event) => {
|
|||
"avatar",
|
||||
"studio",
|
||||
"bio",
|
||||
"skills",
|
||||
"location",
|
||||
"socialLinks",
|
||||
"offering",
|
||||
"lookingFor",
|
||||
"showInDirectory",
|
||||
"helcimCustomerId",
|
||||
];
|
||||
|
|
@ -50,7 +47,6 @@ export default defineEventHandler(async (event) => {
|
|||
"avatarPrivacy",
|
||||
"studioPrivacy",
|
||||
"bioPrivacy",
|
||||
"skillsPrivacy",
|
||||
"locationPrivacy",
|
||||
"socialLinksPrivacy",
|
||||
"offeringPrivacy",
|
||||
|
|
@ -66,6 +62,16 @@ export default defineEventHandler(async (event) => {
|
|||
}
|
||||
});
|
||||
|
||||
// Handle offering and lookingFor separately (nested objects)
|
||||
if (body.offering !== undefined) {
|
||||
updateData["offering.text"] = body.offering.text || "";
|
||||
updateData["offering.tags"] = body.offering.tags || [];
|
||||
}
|
||||
if (body.lookingFor !== undefined) {
|
||||
updateData["lookingFor.text"] = body.lookingFor.text || "";
|
||||
updateData["lookingFor.tags"] = body.lookingFor.tags || [];
|
||||
}
|
||||
|
||||
// Handle privacy settings
|
||||
privacyFields.forEach((privacyField) => {
|
||||
if (body[privacyField] !== undefined) {
|
||||
|
|
@ -100,7 +106,6 @@ export default defineEventHandler(async (event) => {
|
|||
avatar: member.avatar,
|
||||
studio: member.studio,
|
||||
bio: member.bio,
|
||||
skills: member.skills,
|
||||
location: member.location,
|
||||
socialLinks: member.socialLinks,
|
||||
offering: member.offering,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue