mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
feat: go-chi and first routes setup
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package useCases
|
||||
|
||||
import (
|
||||
. "GohCMS2/adapters/secondary/gateways"
|
||||
. "GohCMS2/domain/article"
|
||||
)
|
||||
|
||||
type ListArticlesUseCase struct {
|
||||
articleRepository ArticleRepository
|
||||
}
|
||||
|
||||
func NewListArticlesUseCase() *ListArticlesUseCase {
|
||||
return &ListArticlesUseCase{
|
||||
articleRepository: *NewArticleRepository(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *ListArticlesUseCase) ListArticles() []Article {
|
||||
return g.articleRepository.GetAll()
|
||||
}
|
||||
Reference in New Issue
Block a user