Commit cd9d752c authored by Enrico Bollen's avatar Enrico Bollen 💬
Browse files

Merge branch 'dev' into feat/check-building-opening-times

parents fa02e692 c3aa0ad3
Pipeline #1822 failed with stages
in 17 seconds
......@@ -6,8 +6,6 @@ import (
"git.coco.study/fvitt/good2go/api"
"git.coco.study/fvitt/good2go/database"
"git.coco.study/fvitt/good2go/internal/model"
"git.coco.study/fvitt/good2go/internal/services"
"github.com/getsentry/sentry-go"
)
......@@ -19,10 +17,10 @@ func main() {
// Trigger error message
//sentry.CaptureMessage("Still works!")
initSampleData()
database.Init()
initSampleData()
api.Init()
}
......@@ -33,30 +31,31 @@ func initSampleData() {
//"08:00", "10h", []string{"mon", "tue", "wed", "thu", "fri", "sat"}
// Add Building
building1 := &model.Building{}
building1.New("08:00", "10h", []string{"mon", "tue", "wed", "thu", "fri", "sat"})
building, _ := services.BuildingService.CreateBuilding(building1)
// building1 := &model.Building{}
// building1.New("08:00", "10h", []string{"mon", "tue", "wed", "thu", "fri", "sat"})
// building, _ := services.BuildingService.CreateBuilding(building1)
_, err := services.BuildingService.CreateRoom(building.ID.String(), &model.Room{
Number: 320,
Capacity: 10,
})
if err != nil {
log.Fatal(err)
}
//model.Building.CreateRoom(520, 50)
// _, err := services.BuildingService.CreateRoom(building.ID.String(), &model.Room{
// Number: 320,
// Capacity: 10,
// })
// Add sample Appointments
a1, _ := model.Appointment{}.New("27-11-2016 10:00", "2h")
_, err = services.AppointmentService.AddAppointment(a1)
if err != nil {
log.Fatal(err)
}
a2, _ := model.Appointment{}.New("27-11-2016 13:00", "2h")
_, err = services.AppointmentService.AddAppointment(a2)
if err != nil {
log.Fatal(err)
}
// if err != nil {
// log.Fatal(err)
// }
// //model.Building.CreateRoom(520, 50)
// // Add sample Appointments
// a1, _ := model.Appointment{}.New("27-11-2016 10:00", "2h")
// _, err = services.AppointmentService.AddAppointment(a1)
// if err != nil {
// log.Fatal(err)
// }
// a2, _ := model.Appointment{}.New("27-11-2016 13:00", "2h")
// _, err = services.AppointmentService.AddAppointment(a2)
// if err != nil {
// log.Fatal(err)
// }
}
// Initialize sentry connection so you can track errors with `sentry.CaptureMessage(err)`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment