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

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