fix: Don't provide lang when no language is selected
This commit is contained in:
parent
6d33676fa4
commit
fe16b6e41d
3 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ export const paramDef = {
|
|||
text: { type: "string", maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true },
|
||||
lang: {
|
||||
type: "string",
|
||||
enum: [null, ...Object.keys(langmap)],
|
||||
enum: Object.keys(langmap),
|
||||
nullable: true,
|
||||
},
|
||||
cw: { type: "string", nullable: true, maxLength: 100 },
|
||||
|
|
|
@ -171,7 +171,7 @@ export const paramDef = {
|
|||
text: { type: "string", maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true },
|
||||
lang: {
|
||||
type: "string",
|
||||
enum: [null, ...Object.keys(langmap)],
|
||||
enum: Object.keys(langmap),
|
||||
nullable: true,
|
||||
},
|
||||
cw: { type: "string", nullable: true, maxLength: 250 },
|
||||
|
|
|
@ -992,7 +992,7 @@ async function post() {
|
|||
channelId: props.channel ? props.channel.id : undefined,
|
||||
poll: poll.value,
|
||||
cw: useCw.value ? cw.value || "" : undefined,
|
||||
lang: language.value,
|
||||
lang: language.value ? language.value : undefined,
|
||||
localOnly: localOnly.value,
|
||||
visibility: visibility.value,
|
||||
visibleUserIds:
|
||||
|
|
Loading…
Reference in a new issue