feat: public API, SEO and existing surfaces
This commit is contained in:
1 parent
45fbbc33b1
commit
c390fcfe8d
103 files changed
+4476
-231
No files matched your search
@@ -19,17 +19,17 @@ func (g *GetSiteLanguagesUseCase) Get(key string) (localization.View, error) {
|
||||
if err != nil {
|
||||
return localization.View{}, err
|
||||
}
|
||||
return readSiteLanguages(g.localization, found.ID)
|
||||
return readSiteLanguages(g.localization, found)
|
||||
}
|
||||
|
||||
func readSiteLanguages(repository localization.Repository, siteID uint32) (localization.View, error) {
|
||||
rows, err := repository.Rows(siteID)
|
||||
func readSiteLanguages(repository localization.Repository, owner site.Site) (localization.View, error) {
|
||||
rows, err := repository.Rows(owner.ID)
|
||||
if err != nil {
|
||||
return localization.View{}, err
|
||||
}
|
||||
counts, err := repository.VersionCounts(siteID)
|
||||
counts, err := repository.VersionCounts(owner.ID)
|
||||
if err != nil {
|
||||
return localization.View{}, err
|
||||
}
|
||||
return localization.BuildView(rows, counts), nil
|
||||
return localization.BuildView(rows, counts, owner.Locale), nil
|
||||
}
|
||||
Reference in new issue
Block a user