niki/service/benefactor/kind_box_req/update.go

19 lines
780 B
Go

package benefactorkindboxreqservice
// func (s Service) Update(ctx context.Context, req param.KindBoxReqUpdateRequest) (param.KindBoxReqUpdateResponse, error) {
// // TODO: can benefactor update its request ?
// // TODO: Is Update Mothod Service Responsible to check which kindboxreqID belongs to benefactorID ?
// const op = "userkindboxreqservice.Update"
//
// kindBoxReq, uErr := s.repo.UpdateKindBoxReq(ctx, req.KindBoxReqID, entity.KindBoxReq{
// BenefactorID: req.BenefactorID,
// KindBoxType: req.TypeID,
// CountRequested: req.CountRequested,
// })
// if uErr != nil {
// return param.KindBoxReqUpdateResponse{}, richerror.New(op).WithErr(uErr).WithKind(richerror.KindUnexpected)
// }
//
// return param.KindBoxReqUpdateResponse{KindBoxReq: kindBoxReq}, nil
//}