niki/service/benefactor/kind_box_req/delete.go

18 lines
612 B
Go
Raw Permalink Normal View History

package benefactorkindboxreqservice
import (
"context"
2024-06-14 08:41:36 +00:00
param "git.gocasts.ir/ebhomengo/niki/param/benefactor/kind_box_req"
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
)
func (s Service) Delete(ctx context.Context, req param.KindBoxReqDeleteRequest) (param.KindBoxReqDeleteResponse, error) {
const op = richerror.Op("benefactorkindboxreqservice.Delete")
dErr := s.repo.DeleteKindBoxReqByID(ctx, req.KindBoxReqID)
if dErr != nil {
return param.KindBoxReqDeleteResponse{}, richerror.New(op).WithErr(dErr).WithKind(richerror.KindUnexpected)
}
return param.KindBoxReqDeleteResponse{}, nil
}