refactor services to use Interface and change name to app
This commit is contained in:
@@ -22,7 +22,7 @@ func (s *Server) RegisterRoutes(assets embed.FS) http.Handler {
|
||||
r.Use(middleware.CleanPath)
|
||||
|
||||
r.Use(handler.HTMXMiddleware)
|
||||
r.Use(handler.ServicesMiddleware(s.Services))
|
||||
r.Use(handler.AppMiddleware(s.App))
|
||||
|
||||
s.handleAssets(r, assets)
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
Address string
|
||||
Assets embed.FS
|
||||
Services *service.Services
|
||||
Address string
|
||||
Assets embed.FS
|
||||
App *service.App
|
||||
}
|
||||
|
||||
// NewServer creates and configures a new HTTP server instance.
|
||||
|
||||
Reference in New Issue
Block a user