fix: technical debts left by the Sites, Authors and SEO slices, plus backend support for the new Sites and Authors pagination
This commit is contained in:
1 parent
9f4ce426a8
commit
daf3594316
86 files changed
+4223
-1485
No files matched your search
@@ -76,6 +76,8 @@ type Counts struct {
|
||||
All int `json:"all"`
|
||||
Online int `json:"online"`
|
||||
Draft int `json:"draft"`
|
||||
|
||||
Suggestions int `json:"suggestions"`
|
||||
}
|
||||
|
||||
type PageResult struct {
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
package site
|
||||
|
||||
type ListQuery struct {
|
||||
Q string
|
||||
Page int
|
||||
Size int
|
||||
}
|
||||
|
||||
type Page struct {
|
||||
Items []Site
|
||||
Total int
|
||||
}
|
||||
|
||||
type Repository interface {
|
||||
List() ([]Site, error)
|
||||
Find(query ListQuery) (Page, error)
|
||||
Get(id uint32) (Site, error)
|
||||
GetByKey(key string) (Site, error)
|
||||
GetDefault() (Site, error)
|
||||
|
||||
Reference in new issue
Block a user