fehlerbehebung

This commit is contained in:
xoy 2023-01-29 15:48:27 +01:00
parent 206989bccc
commit 3c26b05dd8
2 changed files with 14 additions and 2 deletions

View File

@ -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
View File

@ -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----------------")
}