Add material code and settings
This commit is contained in:
parent
36be0426f6
commit
498bcf1c24
9 changed files with 279 additions and 60 deletions
|
|
@ -437,7 +437,6 @@ func (s *Server) createHandler() {
|
|||
Log.Debug("Scan dir completed < ", zap.String("path", r.RequestURI))
|
||||
})
|
||||
|
||||
// Recipe Router
|
||||
sheetService, err := sheet.NewSheetService(context.Background(), s.cfg)
|
||||
|
||||
if err != nil {
|
||||
|
|
@ -445,9 +444,14 @@ func (s *Server) createHandler() {
|
|||
return
|
||||
}
|
||||
|
||||
// Recipe Router
|
||||
rr := routers.NewRecipeRouter(database, sheetService)
|
||||
rr.Route(r)
|
||||
|
||||
// Material Router
|
||||
mr := routers.NewMaterialRouter(database)
|
||||
mr.Route(r)
|
||||
|
||||
})
|
||||
|
||||
r.NotFound(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue