diff --git a/apihandler/bucket.go b/apihandler/bucket.go index d6540db..26ea6d1 100644 --- a/apihandler/bucket.go +++ b/apihandler/bucket.go @@ -37,8 +37,8 @@ func (h *V1Handler) V1BucketsGET(c echo.Context) error { return c.JSON(response.StatusCode, response) } -func (h *V1Handler) HandleV1BucketRead(c echo.Context) error { - var response apiresponse.V1BucketRead +func (h *V1Handler) V1BucketGET(c echo.Context) error { + var response apiresponse.V1BucketGET bucket := c.Param("bucket") diff --git a/apiresponse/bucket.go b/apiresponse/bucket.go index 21df0f5..3f4008f 100644 --- a/apiresponse/bucket.go +++ b/apiresponse/bucket.go @@ -7,7 +7,7 @@ type V1BucketsGET struct { } } -type V1BucketRead struct { +type V1BucketGET struct { Response Data struct { Keys []string diff --git a/cmd/server.go b/cmd/server.go index 1dbc918..1b93e1f 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -232,7 +232,7 @@ func RunServer() { groupV1.GET("/bucket", v1Handler.V1BucketsGET) - groupV1.GET("/bucket/:bucket", v1Handler.HandleV1BucketRead) + groupV1.GET("/bucket/:bucket", v1Handler.V1BucketGET) groupV1.POST("/bucket/:bucket", v1Handler.HandleV1DocumentCreate) diff --git a/webhandler/webhandler.go b/webhandler/webhandler.go index b8df36a..6d945c7 100644 --- a/webhandler/webhandler.go +++ b/webhandler/webhandler.go @@ -66,7 +66,7 @@ func (h *WebHandler) HandleDocumentation(c echo.Context) error { for bucket, displayName := range v1BucketsGET.Data.Buckets { // TODO move call to dedicated API client method - var v1BucketReadResponse apiresponse.V1BucketRead + var v1BucketReadResponse apiresponse.V1BucketGET if err = h.ApiClient.Voki.Unmarshal(http.MethodGet, fmt.Sprintf("/v1/bucket/%s", bucket), nil, true, &v1BucketReadResponse); err != nil { response.Error = err.Error()