17 lines
693 B
Go
17 lines
693 B
Go
package controllers
|
|
|
|
import "sprechstundentool/models"
|
|
|
|
// BaseHandler will hold everything that controller needs
|
|
type BaseHandler struct {
|
|
roomRepo models.RoomRepository
|
|
officeHourRepo models.OfficeHourRepository
|
|
courseRepo models.CourseRepository
|
|
tutorRepo models.TutorRepository
|
|
requestRepo models.RequestRepository
|
|
}
|
|
|
|
// NewBaseHandler returns a new BaseHandler
|
|
func NewBaseHandler(roomRepo models.RoomRepository, officeHourRepo models.OfficeHourRepository, courseRepo models.CourseRepository, tutorRepo models.TutorRepository, requestRepo models.RequestRepository) *BaseHandler {
|
|
return &BaseHandler{roomRepo, officeHourRepo, courseRepo, tutorRepo, requestRepo}
|
|
}
|