@@ -12,6 +12,11 @@ import (
1212 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
1313)
1414
15+ type VersionPayload struct {
16+ app * v1alpha1.Application
17+ revisions * []string
18+ }
19+
1520type DependenciesMap struct {
1621 Lock string `json:"helm/Chart.lock"`
1722 Deps string `json:"helm/dependencies"`
@@ -32,7 +37,7 @@ type sourceServerClient struct {
3237}
3338
3439type SourceServerClientInteface interface {
35- GetAppVersion (app * v1alpha1.Application ) * AppVersionResult
40+ GetAppVersion (app * v1alpha1.Application , revisions * [] string ) * AppVersionResult
3641}
3742
3843func (c * sourceServerClient ) sendRequest (method , url string , payload interface {}) ([]byte , error ) {
@@ -72,8 +77,8 @@ func (c *sourceServerClient) sendRequest(method, url string, payload interface{}
7277 return body , nil
7378}
7479
75- func (c * sourceServerClient ) GetAppVersion (app * v1alpha1.Application ) * AppVersionResult {
76- appVersionResult , err := c .sendRequest ("POST" , "/getAppVersion" , app )
80+ func (c * sourceServerClient ) GetAppVersion (app * v1alpha1.Application , revisions * [] string ) * AppVersionResult {
81+ appVersionResult , err := c .sendRequest ("POST" , "/getAppVersion" , VersionPayload { app : app , revisions : revisions } )
7782 if err != nil {
7883 log .Errorf ("error getting app version: %v" , err )
7984 return nil
0 commit comments