portfolio/api/apiRoutes.go

16 lines
353 B
Go
Raw Normal View History

package api
import (
"net/http"
2024-05-16 17:36:44 +02: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)
2024-05-15 15:27:18 +02:00
m.HandleFunc("POST /api/login", handler.Login)
}