forked from ebhomengo/niki
1
0
Fork 0
niki/service/benefactor/address/get_all_provinces.go

20 lines
601 B
Go
Raw Normal View History

2024-01-19 16:37:15 +00:00
package benefactoraddressservice
import (
"context"
param "git.gocasts.ir/ebhomengo/niki/param/benefactor/address"
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
)
func (s Service) GetAllProvinces(ctx context.Context, _ param.GetAllProvincesRequest) (param.GetAllProvincesResponse, error) {
const op = "benefactoraddressservice.GetAllProvinces"
provinces, err := s.repo.GetAllProvinces(ctx)
if err != nil {
return param.GetAllProvincesResponse{}, richerror.New(op).WithErr(err).WithKind(richerror.KindUnexpected)
}
return param.GetAllProvincesResponse{Data: provinces}, nil
2024-01-19 16:37:15 +00:00
}