2024-03-13 14:39:10 +01:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
2024-05-16 17:36:44 +02:00
|
|
|
"portfolio/api/webHandler"
|
2024-03-13 14:39:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func WebRoutes(mux **http.ServeMux) {
|
|
|
|
|
m := *mux
|
|
|
|
|
// Register the routes and webHandler
|
2024-03-13 15:54:09 +01:00
|
|
|
m.HandleFunc("GET /{$}", webHandler.InitHomepage)
|
2024-03-14 19:24:41 +01:00
|
|
|
m.HandleFunc("GET /projecten/{$}", webHandler.InitProjectpage)
|
2024-03-21 18:42:00 +01:00
|
|
|
m.HandleFunc("GET /about/{$}", webHandler.InitAboutpage)
|
2024-05-15 15:27:18 +02:00
|
|
|
m.HandleFunc("GET /login/{$}", webHandler.InitLoginpage)
|
2024-03-21 18:42:00 +01:00
|
|
|
|
2024-03-14 21:32:27 +01:00
|
|
|
m.HandleFunc("POST /theme", webHandler.UpdateTheme)
|
2024-03-14 19:24:41 +01:00
|
|
|
|
|
|
|
|
m.HandleFunc("GET /test", webHandler.Test)
|
2024-03-13 14:39:10 +01:00
|
|
|
}
|