Fix 5xx on document type order
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -19,8 +19,9 @@ type (
|
||||
)
|
||||
|
||||
const (
|
||||
DocumentOrderFieldCreatedAt DocumentOrderField = "CREATED_AT"
|
||||
DocumentOrderFieldTitle DocumentOrderField = "TITLE"
|
||||
DocumentOrderFieldCreatedAt DocumentOrderField = "CREATED_AT"
|
||||
DocumentOrderFieldTitle DocumentOrderField = "TITLE"
|
||||
DocumentOrderFieldDocumentType DocumentOrderField = "DOCUMENT_TYPE"
|
||||
)
|
||||
|
||||
func (p DocumentOrderField) Column() string {
|
||||
|
||||
Reference in New Issue
Block a user