소스 검색

fix: fix balance query (close #138)

JustSong 3 년 전
부모
커밋
897fb9295d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      controller/channel-billing.go

+ 2 - 2
controller/channel-billing.go

@@ -73,8 +73,8 @@ func updateChannelBalance(channel *model.Channel) (float64, error) {
 	}
 	now := time.Now()
 	startDate := fmt.Sprintf("%s-01", now.Format("2006-01"))
-	//endDate := now.Format("2006-01-02")
-	url = fmt.Sprintf("%s/v1/dashboard/billing/usage?start_date=%s&end_date=%s", baseURL, startDate, "2023-06-01")
+	endDate := now.Format("2006-01-02")
+	url = fmt.Sprintf("%s/v1/dashboard/billing/usage?start_date=%s&end_date=%s", baseURL, startDate, endDate)
 	req, err = http.NewRequest("GET", url, nil)
 	if err != nil {
 		return 0, err