Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #224 from stalleyj/creationtime
Browse files Browse the repository at this point in the history
Add creationtime to bind/start call
  • Loading branch information
tobespc authored Nov 18, 2019
2 parents 8c1b2f8 + 3ab3b95 commit 46291ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/utils/project/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"net/http"
"os"
"strings"
"time"

"github.com/eclipse/codewind-installer/config"
"github.com/eclipse/codewind-installer/pkg/utils/connections"
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 46291ce

Please sign in to comment.