Skip to content

Commit

Permalink
api: change folder
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Sep 25, 2023
1 parent 274e432 commit 286eacc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func DeploySubgraph(c *gin.Context) {
fmt.Println("err: ", grapherr.String())
return
}
os.Chdir(req.Folder)
os.Chdir(nonce)
for i := 1; i < len(req.Contracts); i++ {
cmd := exec.Command("graph", "add", req.Contracts[i].Address, "--contract-name", req.Contracts[i].Name, "--start-block", strconv.Itoa(req.Contracts[i].BlockNumber), "--merge-entities")
err := cmd.Start()
Expand Down Expand Up @@ -205,7 +205,7 @@ func DeploySubgraph(c *gin.Context) {
}

os.Chdir(dir)
os.RemoveAll(req.Folder)
os.RemoveAll(nonce)

c.JSON(http.StatusOK, outb.Bytes())
}
Expand Down

0 comments on commit 286eacc

Please sign in to comment.