parent
f1a7ab639b
commit
ef44eda69e
8 changed files with 92 additions and 4 deletions
|
@ -77,6 +77,13 @@ export const meta = {
|
|||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
validator: $.optional.arr($.object()).range(1, 4),
|
||||
desc: {
|
||||
'ja-JP': 'プロフィール補足情報'
|
||||
}
|
||||
},
|
||||
|
||||
isLocked: {
|
||||
validator: $.optional.bool,
|
||||
desc: {
|
||||
|
@ -226,6 +233,14 @@ export default define(meta, async (ps, user, app) => {
|
|||
profileUpdates.pinnedPageId = null;
|
||||
}
|
||||
|
||||
if (ps.fields) {
|
||||
profileUpdates.fields = ps.fields
|
||||
.filter(x => typeof x.name === 'string' && x.name !== '' && typeof x.value === 'string' && x.value !== '')
|
||||
.map(x => {
|
||||
return { name: x.name, value: x.value };
|
||||
});
|
||||
}
|
||||
|
||||
//#region emojis/tags
|
||||
|
||||
let emojis = [] as string[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue