forked from ebhomengo/niki
20 lines
574 B
Go
20 lines
574 B
Go
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) GetAllCities(ctx context.Context, _ param.GetAllCitiesRequest) (param.GetAllCitiesResponse, error) {
|
|
const op = "benefactoraddressservice.GetAllCities"
|
|
|
|
Cities, err := s.repo.GetAllCities(ctx)
|
|
if err != nil {
|
|
return param.GetAllCitiesResponse{}, richerror.New(op).WithErr(err).WithKind(richerror.KindUnexpected)
|
|
}
|
|
|
|
return param.GetAllCitiesResponse{Data: Cities}, nil
|
|
}
|