forked from ebhomengo/niki
20 lines
446 B
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
|
||
|
}
|