19 lines
539 B
Go
19 lines
539 B
Go
package collection
|
|
|
|
import (
|
|
"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/collection"
|
|
)
|
|
|
|
type UpdateUseCase struct {
|
|
collectionRepo collection.Repository
|
|
}
|
|
|
|
// ProvideUpdateUseCase creates the use case for Wire
|
|
func ProvideUpdateUseCase(collectionRepo collection.Repository) *UpdateUseCase {
|
|
return &UpdateUseCase{collectionRepo: collectionRepo}
|
|
}
|
|
|
|
// Execute updates an existing collection record
|
|
func (uc *UpdateUseCase) Execute(c *collection.Collection) error {
|
|
return uc.collectionRepo.Update(c)
|
|
}
|