Add PATCH API endpoint /api/user/{id}/details and api/user/current/details
Why is the endpoint necessary?
To update the user profile data under ?page=settings&sub=general The aim is to merge the page ?page=foodsaver&a=edit&id=ID and ?page=settings&sub=general in VueJs.
Which data must be able to be updated?
{
"isVerified": not needed - /api/user/{userId}/verification
"regionId": I think not needed - POST /api/region/{regionId}/leave and POST /api/region/{regionId}/join
"aboutMePublic": "",
"hasCalendarToken": not needed,
"firstname": "",
"lastname": "",
"gender": 1,
"photo": not needed - PATCH /api/user/photo is available
"sleeping": not needed - PATCH /api/user/sleepmode
"homepage": "", - only for one team member on https://beta.foodsharing.de/team used. I think this field can be removed.
"coordinates": {
"lat":
"lon":
},
}, "address": { ,
"city": "",
"postcode": "",
"email": "",
"landline": "",
"mobile": "",
"birthday": "",
"aboutMeIntern": "", only for team members (only for Region Id 3098 and 1565) on https://beta.foodsharing.de/team used.
"role": 4,
"position": "" only for team members on https://beta.foodsharing.de/team used.
}
Edited by Christian Walgenbach