add tysc handlers to kontor-gin
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"kontor-api-gin/internal/repository"
|
||||
"kontor-api-gin/internal/service"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type WebAppHandler struct {
|
||||
AuthHandler *AuthHandler
|
||||
ComicHandler *ComicHandler
|
||||
}
|
||||
|
||||
func NewWebAppHandler(db *gorm.DB, secret []byte) *WebAppHandler {
|
||||
webapp := &WebAppHandler{
|
||||
AuthHandler: &AuthHandler{Service: service.NewAuthService(repository.NewProfileRepository(db), secret)},
|
||||
ComicHandler: &ComicHandler{Service: service.NewComicService(repository.NewComicRepository(db))},
|
||||
}
|
||||
return webapp
|
||||
}
|
||||
Reference in New Issue
Block a user