sgs and other for all pages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eeeb242a5f
commit
bf568a8652
1 changed files with 12 additions and 4 deletions
16
main.go
16
main.go
|
@ -223,8 +223,12 @@ func renderIndex(lang string, w gemini.ResponseWriter, client TreeManagerClient)
|
||||||
}
|
}
|
||||||
|
|
||||||
func renderFeed(lang string, w gemini.ResponseWriter, r *gemini.Request, client TreeManagerClient) {
|
func renderFeed(lang string, w gemini.ResponseWriter, r *gemini.Request, client TreeManagerClient) {
|
||||||
langFilter := TreeRequest_Filter{Key: "lang", Value: lang}
|
filters := []*TreeRequest_Filter{{Key: "lang", Value: lang}}
|
||||||
filters := []*TreeRequest_Filter{&langFilter}
|
if lang == "sgs" {
|
||||||
|
for _, l := range []string{"lt", "prg", "eo"} {
|
||||||
|
filters = append(filters, &TreeRequest_Filter{Key: "lang", Value: l})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
path := ""
|
path := ""
|
||||||
tr := TreeRequest{Path: &path, Filter: filters}
|
tr := TreeRequest{Path: &path, Filter: filters}
|
||||||
|
@ -408,8 +412,12 @@ func renderFile(lang string, w gemini.ResponseWriter, r *gemini.Request, client
|
||||||
}
|
}
|
||||||
|
|
||||||
func renderAllFiles(lang string, w gemini.ResponseWriter, client TreeManagerClient) {
|
func renderAllFiles(lang string, w gemini.ResponseWriter, client TreeManagerClient) {
|
||||||
langFilter := TreeRequest_Filter{Key: "lang", Value: lang}
|
filters := []*TreeRequest_Filter{{Key: "lang", Value: lang}}
|
||||||
filters := []*TreeRequest_Filter{&langFilter}
|
if lang == "sgs" {
|
||||||
|
for _, l := range []string{"lt", "prg", "eo"} {
|
||||||
|
filters = append(filters, &TreeRequest_Filter{Key: "lang", Value: l})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
path := ""
|
path := ""
|
||||||
tr := TreeRequest{Path: &path, Filter: filters}
|
tr := TreeRequest{Path: &path, Filter: filters}
|
||||||
|
|
Loading…
Reference in a new issue