mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
refac: remove frontend & clearer DDD
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package useCases
|
||||
|
||||
import (
|
||||
"RenewCMS/internal/domain/image"
|
||||
"mime/multipart"
|
||||
)
|
||||
|
||||
type CreateImageUseCase struct {
|
||||
imageRepository image.Repository
|
||||
}
|
||||
|
||||
func NewCreateImageUseCase(imageRepository image.Repository) *CreateImageUseCase {
|
||||
return &CreateImageUseCase{imageRepository}
|
||||
}
|
||||
|
||||
func (g *CreateImageUseCase) CreateImage(file multipart.File, fileHeader multipart.FileHeader) (image.Image, error) {
|
||||
return g.imageRepository.Create(file, fileHeader)
|
||||
}
|
||||
Reference in New Issue
Block a user