package adminkindboxservice

import (
	"context"
	param "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box"
)

func (s Service) GetAwaitingReturn(ctx context.Context, req param.ReturnAwaitingGetRequest) (param.ReturnAwaitingGetResponse, error) {
	const op = "adminkindboxservice.GetAwaitingReturn"

	kindBox, err := s.repo.GetAwaitingReturnByAgent(ctx, req.KindBoxID, req.AgentID)
	if err != nil {

		return param.ReturnAwaitingGetResponse{}, err
	}

	return param.ReturnAwaitingGetResponse{
		KindBox: kindBox,
	}, nil
}
