Skip to content

Commit

Permalink
fix: datastore client api path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-pad committed Apr 26, 2024
1 parent 0d3ddd3 commit 4e11e3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/datastore/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *DefaultClient) buildRequest(path string, queryParams url.Values, method
}

func (c *DefaultClient) GetPlan(namespace string, layer string, run string, attempt string, format string) ([]byte, error) {
req, err := c.buildRequest("/plan", url.Values{
req, err := c.buildRequest("/api/plans", url.Values{
"namespace": {namespace},
"layer": {layer},
"run": {run},
Expand Down Expand Up @@ -110,7 +110,7 @@ func (c *DefaultClient) PutPlan(namespace string, layer string, run string, atte
return err
}
req, err := c.buildRequest(
"/plan",
"/api/plans",
url.Values{
"namespace": {namespace},
"layer": {layer},
Expand Down Expand Up @@ -147,7 +147,7 @@ func (c *DefaultClient) GetLogs(namespace string, layer string, run string, atte
"attempt": {attempt},
}
req, err := c.buildRequest(
"/logs",
"/api/logs",
queryParams,
http.MethodGet,
nil,
Expand Down Expand Up @@ -196,7 +196,7 @@ func (c *DefaultClient) PutLogs(namespace string, layer string, run string, atte
"attempt": {attempt},
}
req, err := c.buildRequest(
"/logs",
"/api/logs",
queryParams,
http.MethodPut,
strings.NewReader(string(body)),
Expand All @@ -217,7 +217,7 @@ func (c *DefaultClient) PutLogs(namespace string, layer string, run string, atte

func (c *DefaultClient) GetAttempts(namespace string, layer string, run string) (int, error) {
req, err := c.buildRequest(
"/attempts",
"/api/attempts",
url.Values{
"namespace": {namespace},
"layer": {layer},
Expand Down

0 comments on commit 4e11e3d

Please sign in to comment.