Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Singh <[email protected]>
  • Loading branch information
theBeginner86 committed Jan 1, 2025
1 parent ebd42d6 commit 397dae4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/kanvas-snapshot/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func CreateMesheryDesign(uri, name, email string) (string, error) {

func GenerateSnapshot(contentID, assetLocation string, ghAccessToken string) error {
payload := fmt.Sprintf(`{"ref":"master","inputs":{"contentID":"%s","assetLocation":"%s"}}`, contentID, assetLocation)
req, err := http.NewRequest("POST", "https://api.github.com/repos/meshery/helm-kanvas-snapshot/actions/workflows/kanvas.yml/dispatches", bytes.NewBuffer([]byte(payload)))
req, err := http.NewRequest("POST", "https://api.github.com/repos/meshery/helm-kanvas-snapshot/actions/workflows/kanvas.yaml/dispatches", bytes.NewBuffer([]byte(payload)))
if err != nil {
return err
}
Expand All @@ -221,6 +221,17 @@ func GenerateSnapshot(contentID, assetLocation string, ghAccessToken string) err
return err
}
defer resp.Body.Close()
fmt.Println(resp.Status)

// read resp

bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
}
bodyString := string(bodyBytes)
fmt.Println(bodyString)


return nil
}
Expand Down

0 comments on commit 397dae4

Please sign in to comment.