fehlerbehebung

This commit is contained in:
xoy 2023-01-29 19:00:15 +01:00
parent b00709c526
commit d74fa09743
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,7 @@ func htmlReplacer(input string, activePage string) string {
if i > 0 { if i > 0 {
tempB += "!SPLIT" tempB += "!SPLIT"
} }
tempB += htmlLinkElement(htmlElement("div", tempA, ""), "event/"+string(Event.id), false, "class=\"event\"") tempB += htmlLinkElement(htmlElement("div", tempA, ""), "event/"+strconv.Itoa(Event.id), false, "class=\"event\"")
} }
output = strings.ReplaceAll(output, "!EVENTS", htmlElement("div", strings.ReplaceAll(tempB, "!SPLIT", ""), "class=\"eventList\"")) output = strings.ReplaceAll(output, "!EVENTS", htmlElement("div", strings.ReplaceAll(tempB, "!SPLIT", ""), "class=\"eventList\""))
tempC := strings.Split(tempB, "!SPLIT") tempC := strings.Split(tempB, "!SPLIT")

View File

@ -3,6 +3,7 @@ package main
import ( import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"strconv"
"strings" "strings"
) )
@ -62,7 +63,7 @@ func handleEvents() {
logger("----------------HANDLE EVENTS----------------") logger("----------------HANDLE EVENTS----------------")
events := getEvents() events := getEvents()
for _, e := range events { for _, e := range events {
httpHandleFunc("event/"+string(e.id), "./web/pages/event.html", "text/html") httpHandleFunc("event/"+strconv.Itoa(e.id), "./web/pages/event.html", "text/html")
} }
logger("----------------HANDLE END----------------") logger("----------------HANDLE END----------------")
} }