|
@@ -6,6 +6,7 @@ import (
|
|
|
"fmt"
|
|
|
"io/ioutil"
|
|
|
"net/http"
|
|
|
+ "net/url"
|
|
|
"strings"
|
|
|
)
|
|
|
|
|
@@ -145,14 +146,14 @@ func GetProductsByApi(token string) (data []models.KplerProduct, err error) {
|
|
|
func GetKplerDataByApi(params models.KplerFlowDataLibReq, token string) (ret *models.KplerFlowDataResp, err error) {
|
|
|
flowDirection := params.FlowDirection
|
|
|
granularity := params.Granularity
|
|
|
- products := params.Products
|
|
|
- split := params.Split
|
|
|
+ products := url.QueryEscape(params.Products)
|
|
|
+ split := url.QueryEscape(params.Split)
|
|
|
startDate := params.StartDate
|
|
|
endDate := params.EndDate
|
|
|
unit := params.Unit
|
|
|
withIntraRegion := params.WithIntraRegion
|
|
|
- fromZones := params.FromZones
|
|
|
- toZones := params.ToZones
|
|
|
+ fromZones := url.QueryEscape(params.FromZones)
|
|
|
+ toZones := url.QueryEscape(params.ToZones)
|
|
|
onlyRealized := params.OnlyRealized
|
|
|
withForecast := params.WithForecast
|
|
|
withProductEstimation := params.WithProductEstimation
|