fix: Allow sort by title in documents.list

This commit is contained in:
Tom Moor
2023-01-06 16:58:39 -05:00
parent 4b47bffcf5
commit 9f825b9adf

View File

@@ -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 */