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 {
|
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")
|
||||||
|
|
3
main.go
3
main.go
|
@ -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----------------")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue