niki/service/admin/kind_box_req/get_delivery_awaiting.go

22 lines
560 B
Go
Raw Normal View History

package adminkindboxreqservice
import (
"context"
param "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box_req"
)
func (s Service) GetAwaitingDelivery(ctx context.Context, req param.DeliveryAwaitingGetRequest) (param.DeliveryAwaitingGetResponse, error) {
const op = "adminkindboxreqservice.GetAwaitingDelivery"
kindBoxReq, err := s.repo.GetAwaitingDeliveryByAgent(ctx, req.KindBoxReqID, req.AgentID)
if err != nil {
return param.DeliveryAwaitingGetResponse{}, err
}
return param.DeliveryAwaitingGetResponse{
KindBoxReq: kindBoxReq,
}, nil
}