refac: migration crash, real-database tests, site deleted during create, ruels out of the repo, lists

This commit is contained in:
Florian Sylvain committed 2026-11-03 05:06:04 +01:00
1 parent 680b9a1308
commit 9d284e65a9
62 files changed
+1858 -987

No files matched your search

@@ -18,6 +18,7 @@ var (
ErrInvalidTranslation = errors.New("the translation request is not valid")
ErrStoryMoveRequired = errors.New("the story must be moved as a whole")
ErrSlugConflict = errors.New("an address already exists on the destination site")
ErrTargetSiteDeleted = errors.New("the target site was deleted while the article was being created")
)
const (
@@ -99,7 +99,8 @@ type Repository interface {
CountVersions(filters Filters) (Counts, error)
FindStoryPage(filters StoryFilters) (StoryPage, error)
CountStories(filters StoryFilters) (StoryCounts, error)
ListByStories(storyIDs []uint32) ([]Article, error)
ListByStories(storyIDs []uint32, readable StoryFilters) ([]Article, error)
FindTitleMatches(q string, readable StoryFilters) ([]uint32, error)
Get(id uint32) (Article, error)
GetByName(name string) (Article, error)
GetByLangSlug(siteID uint32, lang string, slug string) (Article, error)
@@ -14,7 +14,6 @@ type StoryFilters struct {
Missing bool
Status string
AuthorID *uint32
Q string
VersionIDs *[]uint32
Sort Sort
Page int