Add Plan page with day planner

This commit is contained in:
Martin Pander
2022-11-26 18:41:39 +01:00
parent d9b92ab4e9
commit 32346e0aa9
48 changed files with 2400 additions and 148 deletions

View File

@ -28,8 +28,11 @@ func main() {
mapper := mapping.NewMapperImpl()
DefaultApiService := service.NewApiService(db, mapper)
DefaultApiController := dashapi.NewDefaultApiController(DefaultApiService)
JournalApiService := service.NewJournalApiService(db, mapper)
JournalApiController := dashapi.NewJournalApiController(JournalApiService)
PlanApiService := service.NewPlanApiService(db, mapper)
PlanApiController := dashapi.NewPlanApiController(PlanApiService)
cors := handlers.CORS(
// handlers.AllowedMethods([]string{"GET", "POST", "DELETE"}),
@ -37,7 +40,7 @@ func main() {
handlers.AllowedOrigins([]string{"*"}),
)
router := dashapi.NewRouter(DefaultApiController)
router := dashapi.NewRouter(JournalApiController, PlanApiController)
router.Methods("GET", "POST", "DELETE", "OPTIONS")
log.Printf("Starting server.")