forked from ebhomengo/niki
1
0
Fork 0
niki/service/admin/kind_box/enumerate.go

20 lines
446 B
Go

package adminkindboxservice
import (
"context"
param "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box"
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
)
func (s Service) Enumerate(ctx context.Context, req param.EnumerateKindBoxRequest) error {
const op = "AdminKindBoxService.Enumerate"
err := s.repo.EnumerateKindBox(ctx, req.KindBoxID, req.Amount)
if err != nil {
return richerror.New(op).WithErr(err)
}
return nil
}