Add material code and settings

This commit is contained in:
Kenta420 2023-10-06 15:33:10 +07:00
parent 36be0426f6
commit 498bcf1c24
9 changed files with 279 additions and 60 deletions

View file

@ -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) {