Fix 5xx on document type order

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-07-03 08:26:25 +02:00
parent 843b46ff3c
commit d4dbadee10
4 changed files with 19 additions and 6 deletions

View File

@@ -47,6 +47,8 @@ func (p Document) CursorKey(orderBy DocumentOrderField) page.CursorKey {
return page.NewCursorKey(p.ID, p.CreatedAt)
case DocumentOrderFieldTitle:
return page.NewCursorKey(p.ID, p.Title)
case DocumentOrderFieldDocumentType:
return page.NewCursorKey(p.ID, p.DocumentType)
}
panic(fmt.Sprintf("unsupported order by: %s", orderBy))