mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added update profile description field
This commit is contained in:
parent
8b165ae8d3
commit
b48c48a0c4
@ -100,4 +100,34 @@ export default [
|
||||
"title": "Primary badge",
|
||||
"description": "Change your primary badge",
|
||||
},
|
||||
{
|
||||
"id": "description",
|
||||
"group": "account.basicInfo",
|
||||
"type": "TextArea",
|
||||
"icon": "Edit3",
|
||||
"title": "Description",
|
||||
"description": "Change your description for your profile",
|
||||
"props": {
|
||||
"placeholder": "Enter here a description for your profile",
|
||||
},
|
||||
"defaultValue": async () => {
|
||||
const userData = await User.data()
|
||||
return userData.description
|
||||
},
|
||||
"onUpdate": async (value) => {
|
||||
const selfId = await User.selfUserId()
|
||||
|
||||
const result = window.app.request.post.updateUser({
|
||||
_id: selfId,
|
||||
update: {
|
||||
description: value
|
||||
}
|
||||
})
|
||||
|
||||
if (result) {
|
||||
return result
|
||||
}
|
||||
},
|
||||
"debounced": true,
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user