forked from naskya/firefish
fix: profile updates fail if language isn't specified
This commit is contained in:
parent
37b75401c7
commit
4399e25398
1 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ export default define(meta, paramDef, async (ps, _user, token) => {
|
|||
|
||||
if (ps.name !== undefined) updates.name = ps.name;
|
||||
if (ps.description !== undefined) profileUpdates.description = ps.description;
|
||||
if (ps.lang !== undefined) profileUpdates.lang = ps.lang;
|
||||
if (typeof ps.lang === "string") profileUpdates.lang = ps.lang;
|
||||
if (ps.location !== undefined) profileUpdates.location = ps.location;
|
||||
if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday;
|
||||
if (ps.ffVisibility !== undefined)
|
||||
|
@ -189,7 +189,7 @@ export default define(meta, paramDef, async (ps, _user, token) => {
|
|||
profileUpdates.mutedInstances = ps.mutedInstances;
|
||||
if (ps.mutingNotificationTypes !== undefined)
|
||||
profileUpdates.mutingNotificationTypes =
|
||||
ps.mutingNotificationTypes as typeof notificationTypes[number][];
|
||||
ps.mutingNotificationTypes as (typeof notificationTypes)[number][];
|
||||
if (typeof ps.isLocked === "boolean") updates.isLocked = ps.isLocked;
|
||||
if (typeof ps.isExplorable === "boolean")
|
||||
updates.isExplorable = ps.isExplorable;
|
||||
|
|
Loading…
Reference in a new issue