Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into pebble_e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran committed Jan 6, 2025
2 parents 33890a2 + d5a02ee commit 1d96b9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func signMesssage(data []byte, projectID uint64, cfg *project.Config, key *ecdsa
}

func createTask(body []byte, apiurl string) (string, error) {
req, err := http.NewRequest("POST", fmt.Sprintf("%s/task", apiurl), bytes.NewBuffer(body))
req, err := http.NewRequest("POST", fmt.Sprintf("%s/v1/task", apiurl), bytes.NewBuffer(body))
if err != nil {
return "", err
}
Expand Down Expand Up @@ -100,7 +100,7 @@ func createTask(body []byte, apiurl string) (string, error) {
}

func queryTask(taskID string, apiurl string) (*api.QueryTaskResp, error) {
resp, err := http.Get(fmt.Sprintf("%s/task/%s", apiurl, taskID))
resp, err := http.Get(fmt.Sprintf("%s/v1/task/%s", apiurl, taskID))
if err != nil {
return nil, errors.Wrap(err, "failed to send request")
}
Expand Down
4 changes: 2 additions & 2 deletions service/apinode/api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ func Run(p *db.DB, projectManager *project.Manager,
proverAddr: proverAddr,
}

s.engine.POST("/task", s.createTask)
s.engine.GET("/task/:id", s.queryTask)
s.engine.POST("/v1/task", s.createTask)
s.engine.GET("/v1/task/:id", s.queryTask)
metrics.RegisterMetrics(s.engine)

if err := s.engine.Run(addr); err != nil {
Expand Down

0 comments on commit 1d96b9e

Please sign in to comment.