mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
18 lines
369 B
Go
18 lines
369 B
Go
package useCases
|
|
|
|
import (
|
|
"GoCMS/domain/gateways"
|
|
)
|
|
|
|
type DeletePostUseCase struct {
|
|
postRepository gateways.IPostRepository
|
|
}
|
|
|
|
func NewDeletePostUseCase(postRepository gateways.IPostRepository) *DeletePostUseCase {
|
|
return &DeletePostUseCase{postRepository}
|
|
}
|
|
|
|
func (g *DeletePostUseCase) DeletePost(userId uint32) error {
|
|
return g.postRepository.Delete(userId)
|
|
}
|