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)
|
||||
}
|
||||
logger("event added!")
|
||||
logger("----------------HANDLE IMAGES----------------")
|
||||
handleImages()
|
||||
logger("----------------HANDLE END----------------")
|
||||
} else {
|
||||
logger("event not added!")
|
||||
}
|
||||
|
|
13
main.go
13
main.go
|
@ -28,12 +28,13 @@ func main() {
|
|||
}
|
||||
|
||||
func handler() {
|
||||
logger("----------------HANDLE PAGES----------------")
|
||||
|
||||
//pages
|
||||
logger("----------------HANDLE Pages----------------")
|
||||
httpHandleFunc("", "./web/pages/home.html", "text/html")
|
||||
handleFilesInFolder("", "./web/pages/", true)
|
||||
logger("----------------HANDLE END----------------")
|
||||
|
||||
logger("----------------HANDLE ADMIN LOGIN----------------")
|
||||
//admin pages
|
||||
keys := getAdminKeys()
|
||||
if len(keys) > 0 {
|
||||
|
@ -42,11 +43,19 @@ func handler() {
|
|||
httpHandleFuncWithPOST("admin/"+key+"/addEvent", "./web/pages/admin/dashboard.html", "text/html")
|
||||
}
|
||||
}
|
||||
logger("----------------HANDLE END----------------")
|
||||
|
||||
//styles
|
||||
logger("----------------HANDLE STYLES----------------")
|
||||
handleFilesInFolder("style/", "./web/styles/", false)
|
||||
logger("----------------HANDLE END----------------")
|
||||
|
||||
//images
|
||||
handleImages()
|
||||
}
|
||||
|
||||
func handleImages() {
|
||||
logger("----------------HANDLE IMAGES----------------")
|
||||
handleFilesInFolder("image/", "./web/images/", false)
|
||||
logger("----------------HANDLE END----------------")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue