fehlerbehebung
This commit is contained in:
parent
4a44e84a15
commit
2a5af4be85
3
http.go
3
http.go
|
@ -79,6 +79,9 @@ func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string)
|
||||||
errorPanic(err)
|
errorPanic(err)
|
||||||
}
|
}
|
||||||
logger("event added!")
|
logger("event added!")
|
||||||
|
logger("----------------HANDLE IMAGES----------------")
|
||||||
|
handleImages()
|
||||||
|
logger("----------------HANDLE END----------------")
|
||||||
} else {
|
} else {
|
||||||
logger("event not added!")
|
logger("event not added!")
|
||||||
}
|
}
|
||||||
|
|
13
main.go
13
main.go
|
@ -28,12 +28,13 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handler() {
|
func handler() {
|
||||||
logger("----------------HANDLE PAGES----------------")
|
|
||||||
|
|
||||||
//pages
|
//pages
|
||||||
|
logger("----------------HANDLE Pages----------------")
|
||||||
httpHandleFunc("", "./web/pages/home.html", "text/html")
|
httpHandleFunc("", "./web/pages/home.html", "text/html")
|
||||||
handleFilesInFolder("", "./web/pages/", true)
|
handleFilesInFolder("", "./web/pages/", true)
|
||||||
|
logger("----------------HANDLE END----------------")
|
||||||
|
|
||||||
|
logger("----------------HANDLE ADMIN LOGIN----------------")
|
||||||
//admin pages
|
//admin pages
|
||||||
keys := getAdminKeys()
|
keys := getAdminKeys()
|
||||||
if len(keys) > 0 {
|
if len(keys) > 0 {
|
||||||
|
@ -42,11 +43,19 @@ func handler() {
|
||||||
httpHandleFuncWithPOST("admin/"+key+"/addEvent", "./web/pages/admin/dashboard.html", "text/html")
|
httpHandleFuncWithPOST("admin/"+key+"/addEvent", "./web/pages/admin/dashboard.html", "text/html")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger("----------------HANDLE END----------------")
|
||||||
|
|
||||||
//styles
|
//styles
|
||||||
|
logger("----------------HANDLE STYLES----------------")
|
||||||
handleFilesInFolder("style/", "./web/styles/", false)
|
handleFilesInFolder("style/", "./web/styles/", false)
|
||||||
|
logger("----------------HANDLE END----------------")
|
||||||
|
|
||||||
//images
|
//images
|
||||||
|
handleImages()
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleImages() {
|
||||||
|
logger("----------------HANDLE IMAGES----------------")
|
||||||
handleFilesInFolder("image/", "./web/images/", false)
|
handleFilesInFolder("image/", "./web/images/", false)
|
||||||
logger("----------------HANDLE END----------------")
|
logger("----------------HANDLE END----------------")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue