fehlerbehebung
This commit is contained in:
parent
b00709c526
commit
d74fa09743
2
html.go
2
html.go
|
@ -83,7 +83,7 @@ func htmlReplacer(input string, activePage string) string {
|
|||
if i > 0 {
|
||||
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\""))
|
||||
tempC := strings.Split(tempB, "!SPLIT")
|
||||
|
|
3
main.go
3
main.go
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -62,7 +63,7 @@ func handleEvents() {
|
|||
logger("----------------HANDLE EVENTS----------------")
|
||||
events := getEvents()
|
||||
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----------------")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue