portfolio/api/apiRoutes.go

15 lines
305 B
Go
Raw Normal View History

package api
import (
"net/http"
2024-03-13 15:54:09 +01:00
"portfolio/api/handler"
)
func ApiRoutes(mux **http.ServeMux) {
m := *mux
// Register the routes and webHandler
2024-03-13 15:54:09 +01:00
m.HandleFunc("/api/", handler.CatchAllHandler)
m.HandleFunc("POST /api/user", handler.CreateUser)
m.HandleFunc("GET /api/user/{id}", handler.GetUser)
}