refac: stale test entries, failing web tests, Postgre backup bug, Hardcoded MySQL table count, Stale Postgre connection in test, own-scope visibility filter, GetAll ignoring its error, JSON tags in use-case types, 31 copies of DESKTOP_QUERY, ProfileView endpoint paths
This commit is contained in:
1 parent
efecdee200
commit
5d6f378fce
87 files changed
+696
-373
No files matched your search
@@ -30,14 +30,15 @@ func DefaultSort() Sort {
|
||||
}
|
||||
|
||||
type Filters struct {
|
||||
IsOnline *bool
|
||||
SiteID *uint32
|
||||
Page int
|
||||
Size int
|
||||
Q string
|
||||
Status string
|
||||
Sort Sort
|
||||
Unpaged bool
|
||||
IsOnline *bool
|
||||
SiteID *uint32
|
||||
VisibleTo *uint32
|
||||
Page int
|
||||
Size int
|
||||
Q string
|
||||
Status string
|
||||
Sort Sort
|
||||
Unpaged bool
|
||||
}
|
||||
|
||||
type Nullable[T any] struct {
|
||||
@@ -89,9 +90,10 @@ type Repository interface {
|
||||
FindByFilters(filters Filters) ([]Article, error)
|
||||
FindPage(filters Filters) (PageResult, error)
|
||||
CountByVisibility(onlineOnly bool) (Counts, error)
|
||||
CountVisibleTo(userID uint32) (Counts, error)
|
||||
Get(id uint32) (Article, error)
|
||||
GetByName(name string) (Article, error)
|
||||
GetAll() []Article
|
||||
GetAll() ([]Article, error)
|
||||
Create(post Article) (Article, error)
|
||||
UpdateBody(id uint32, body string) (Article, error)
|
||||
Update(id uint32, update Update) (Article, error)
|
||||
|
||||
@@ -48,6 +48,7 @@ func DefaultSort() Sort {
|
||||
|
||||
type Filters struct {
|
||||
ContentTypeID uint32
|
||||
CreatedBy *uint32
|
||||
Page int
|
||||
Size int
|
||||
Sort Sort
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Repository interface {
|
||||
Create(invite Invite) (Invite, error)
|
||||
GetAll() []Invite
|
||||
GetAll() ([]Invite, error)
|
||||
Delete(id uint32) error
|
||||
Renew(id uint32, hashedCode string, expiresAt time.Time, createdAt time.Time) (Invite, error)
|
||||
AcceptWithUser(inviteID uint32, acceptedAt time.Time, newUser user.User) (user.User, error)
|
||||
|
||||
@@ -6,7 +6,7 @@ type Repository interface {
|
||||
Get(id uint32) (User, error)
|
||||
GetByUsername(username string) (User, error)
|
||||
GetByEmail(email string) (User, error)
|
||||
GetAll() []User
|
||||
GetAll() ([]User, error)
|
||||
FindByIDs(ids []uint32) ([]User, error)
|
||||
Create(user User) (User, error)
|
||||
Delete(id uint32) error
|
||||
|
||||
Reference in new issue
Block a user