mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🐛 Fix error when masto-fe stupidly sends empty spoiler_text
This commit is contained in:
parent
aff51b651c
commit
59cd519337
2 changed files with 17 additions and 1 deletions
|
|
@ -58,7 +58,9 @@ export const StatusSource = z
|
|||
description: "The plain text used to compose the status.",
|
||||
example: "this is a status that will be edited",
|
||||
}),
|
||||
spoiler_text: z.string().trim().min(1).max(1024).openapi({
|
||||
// min(0) because some masto-fe clients send empty spoiler_text
|
||||
// when they don't want to set it.
|
||||
spoiler_text: z.string().trim().min(0).max(1024).openapi({
|
||||
description:
|
||||
"The plain text used to compose the status’s subject or content warning.",
|
||||
example: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue