refac: renamed 'post' -> 'article'

This commit is contained in:
Florian Sylvain
2025-11-17 19:27:48 +01:00
parent cb9a431488
commit b470bfcc67
44 changed files with 701 additions and 967 deletions
+26
View File
@@ -0,0 +1,26 @@
package useCases
import (
"GoCMS/domain/article"
"GoCMS/domain/gateways"
)
type UpdateArticleUseCase struct {
articleRepository gateways.IArticleRepository
}
func NewUpdateArticleUseCase(articleRepository gateways.IArticleRepository) *UpdateArticleUseCase {
return &UpdateArticleUseCase{articleRepository}
}
func (g *UpdateArticleUseCase) UpdateBody(id uint32, body string) (article.Article, error) {
return g.articleRepository.UpdateBody(id, body)
}
func (g *UpdateArticleUseCase) AddImage(articleId uint32, imageId uint32) error {
return g.articleRepository.AddImage(articleId, imageId)
}
func (g *UpdateArticleUseCase) UpdateIsOnline(id uint32, isOnline bool) (article.Article, error) {
return g.articleRepository.UpdateIsOnline(id, isOnline)
}