implement proper sever route handling
This commit is contained in:
21
pkg/web/handler/handler.go
Normal file
21
pkg/web/handler/handler.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/service"
|
||||
)
|
||||
|
||||
type Route struct {
|
||||
Pattern string
|
||||
Handler http.Handler
|
||||
}
|
||||
|
||||
func GetRoutes(svc *service.Services) []Route {
|
||||
var routes []Route
|
||||
|
||||
routes = append(routes, PagesRoutes(svc)...)
|
||||
routes = append(routes, IssuesRoutes(svc)...)
|
||||
|
||||
return routes
|
||||
}
|
||||
Reference in New Issue
Block a user