From 3ab3b9510004f36bd9828cd11e10750c32433767 Mon Sep 17 00:00:00 2001 From: Julie Stalley Date: Mon, 18 Nov 2019 15:57:54 +0000 Subject: [PATCH] Add creationtime to bind/start call Signed-off-by: Julie Stalley --- pkg/utils/project/bind.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/utils/project/bind.go b/pkg/utils/project/bind.go index 111522e3..e9a75e7a 100644 --- a/pkg/utils/project/bind.go +++ b/pkg/utils/project/bind.go @@ -19,6 +19,7 @@ import ( "net/http" "os" "strings" + "time" "github.com/eclipse/codewind-installer/config" "github.com/eclipse/codewind-installer/pkg/utils/connections" @@ -39,6 +40,7 @@ type ( ProjectType string `json:"projectType"` Name string `json:"name"` Path string `json:"path"` + Time int64 `json:"creationTime"` } // BindEndRequest represents the request body parameters required to complete a bind @@ -79,12 +81,14 @@ func Bind(projectPath string, name string, language string, projectType string, if conErr != nil { return nil, &ProjectError{errOpConNotFound, conErr.Err, conErr.Error()} } + creationTime := time.Now().UnixNano() / 1000000 bindRequest := BindRequest{ Language: language, Name: name, ProjectType: projectType, Path: projectPath, + Time: creationTime, } buf := new(bytes.Buffer) json.NewEncoder(buf).Encode(bindRequest)