diff --git a/server/routes/api/documents/schema.ts b/server/routes/api/documents/schema.ts index 78fb92339..286ed977c 100644 --- a/server/routes/api/documents/schema.ts +++ b/server/routes/api/documents/schema.ts @@ -8,7 +8,7 @@ const DocumentsSortParamsSchema = z.object({ /** Specifies the attributes by which documents will be sorted in the list */ sort: z .string() - .refine((val) => ["createdAt", "updatedAt", "index"].includes(val)) + .refine((val) => ["createdAt", "updatedAt", "index", "title"].includes(val)) .default("updatedAt"), /** Specifies the sort order with respect to sort field */