API fix
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
func NewPricingAPI(redis *redis.Client) *PricingAPI {
|
||||
return &PricingAPI{NewHttpClient(redis)}
|
||||
func NewPricingAPI(ua string, redis *redis.Client) *PricingAPI {
|
||||
return &PricingAPI{NewHttpClient(ua, redis)}
|
||||
}
|
||||
|
||||
type PricingAPI struct {
|
||||
@@ -18,7 +18,7 @@ type PricingAPI struct {
|
||||
func (a *PricingAPI) GetProductPrice(productID int) (*def.ProductPriceResponse, error) {
|
||||
url := fmt.Sprintf("/api/v1/product/%d", productID)
|
||||
res := new(def.ProductPriceResponse)
|
||||
if err := a.httpClient.SendGet("pricing", url, nil, res); err != nil {
|
||||
if err := a.httpClient.SendGet("pricing-svc", url, nil, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user