Resolve #327
This commit is contained in:
parent
1c86a4bc26
commit
45bee7cc2f
5 changed files with 25 additions and 0 deletions
|
@ -6,6 +6,7 @@ import acceptAllFollowRequests from '../../../../services/following/requests/acc
|
|||
import { publishToFollowers } from '../../../../services/i/update';
|
||||
import define from '../../define';
|
||||
import getDriveFileUrl from '../../../../misc/get-drive-file-url';
|
||||
const langmap = require('langmap');
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
@ -32,6 +33,13 @@ export const meta = {
|
|||
}
|
||||
},
|
||||
|
||||
lang: {
|
||||
validator: $.str.optional.nullable.or(Object.keys(langmap)),
|
||||
desc: {
|
||||
'ja-JP': '言語'
|
||||
}
|
||||
},
|
||||
|
||||
location: {
|
||||
validator: $.str.optional.nullable.pipe(isValidLocation),
|
||||
desc: {
|
||||
|
@ -121,6 +129,7 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
|
|||
|
||||
if (ps.name !== undefined) updates.name = ps.name;
|
||||
if (ps.description !== undefined) updates.description = ps.description;
|
||||
if (ps.lang !== undefined) updates.lang = ps.lang;
|
||||
if (ps.location !== undefined) updates['profile.location'] = ps.location;
|
||||
if (ps.birthday !== undefined) updates['profile.birthday'] = ps.birthday;
|
||||
if (ps.avatarId !== undefined) updates.avatarId = ps.avatarId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue