avoid abcex overlap on defaultLang
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Arnas Udovic 2024-07-18 21:41:05 +03:00
parent 8a8d7dc819
commit 0da0597644

View file

@ -136,7 +136,7 @@ func process(_ context.Context, w gemini.ResponseWriter, r *gemini.Request) {
log.Fatal(err)
return
}
db.Inc("page_counter." + defaultLang)
db.Inc("page_counter._" + defaultLang)
conn, err := grpc.Dial(
fileSrvHost+":"+fileSrvPort,
@ -240,10 +240,10 @@ func renderIndex(w gemini.ResponseWriter, client TreeManagerClient) {
if !found {
}
pageCounter, found := db.Get("page_counter." + defaultLang)
pageCounter, found := db.Get("page_counter._" + defaultLang)
if !found {
pageCounter = "1"
db.Save("page_counter."+defaultLang, "1")
db.Save("page_counter._"+defaultLang, "1")
}
w.SetMediaType("text/gemini")