xyxie 2 週間 前
コミット
dbf5c3ce5e
1 ファイル変更5 行追加4 行削除
  1. 5 4
      services/kpler/liquid.go

+ 5 - 4
services/kpler/liquid.go

@@ -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