2024-01-02 14:04:16 +00:00
|
|
|
package benefactorkindboxreqservice
|
2023-12-25 17:08:19 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
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) {
|
2023-12-26 17:53:25 +00:00
|
|
|
// TODO: Does business domain need to delete an kindboxreq ?
|
2023-12-25 17:08:19 +00:00
|
|
|
const op = "userkindboxreqservice.Delete"
|
|
|
|
|
|
|
|
dErr := s.repo.DeleteKindBoxReq(ctx, req.KindBoxReqID)
|
|
|
|
if dErr != nil {
|
2023-12-26 13:11:29 +00:00
|
|
|
return param.KindBoxReqDeleteResponse{}, richerror.New(op).WithErr(dErr).WithKind(richerror.KindUnexpected)
|
2023-12-25 17:08:19 +00:00
|
|
|
}
|
|
|
|
|
2023-12-26 13:11:29 +00:00
|
|
|
return param.KindBoxReqDeleteResponse{}, nil
|
2023-12-25 17:08:19 +00:00
|
|
|
}
|