mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
feat: migrated prisma -> gorm
This commit is contained in:
@@ -3,15 +3,16 @@ package useCases
|
||||
import (
|
||||
. "GohCMS2/adapters/secondary/gateways"
|
||||
. "GohCMS2/domain/article"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ListArticlesUseCase struct {
|
||||
articleRepository ArticleRepository
|
||||
}
|
||||
|
||||
func NewListArticlesUseCase() *ListArticlesUseCase {
|
||||
func NewListArticlesUseCase(db *gorm.DB) *ListArticlesUseCase {
|
||||
return &ListArticlesUseCase{
|
||||
articleRepository: *NewArticleRepository(),
|
||||
articleRepository: *NewArticleRepository(db),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user