Fix schema responses not matching tests

This commit is contained in:
Jamie Curnow committed 2023-05-29 14:19:17 +10:00
1 parent 4b39ef0eba
commit c849938da2
14 files changed
+28 -13

No files matched your search

+8
View File
@@ -14,3 +14,11 @@ type Sort struct {
Field string `json:"field"`
Direction string `json:"direction"`
}
// TableName overrides the table name used by gorm
func (p *PageInfo) GetSort(def Sort) []Sort {
if p.Sort == nil {
return []Sort{def}
}
return p.Sort
}