15 lines
305 B
Go
15 lines
305 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"portfolio/api/handler"
|
|
)
|
|
|
|
func ApiRoutes(mux **http.ServeMux) {
|
|
m := *mux
|
|
// Register the routes and webHandler
|
|
m.HandleFunc("/api/", handler.CatchAllHandler)
|
|
m.HandleFunc("POST /api/user", handler.CreateUser)
|
|
m.HandleFunc("GET /api/user/{id}", handler.GetUser)
|
|
}
|