change!: renommer HandleV1BucketRead à V1BucketGET

BREAKING: renommer `HandleV1BucketRead` à `V1BucketGET`
This commit is contained in:
Victor Lacasse-Beaudoin 2023-11-20 15:33:07 -05:00
parent c40f7eb9dc
commit d3dc5b1571
4 changed files with 5 additions and 5 deletions

View file

@ -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")

View file

@ -7,7 +7,7 @@ type V1BucketsGET struct {
}
}
type V1BucketRead struct {
type V1BucketGET struct {
Response
Data struct {
Keys []string

View file

@ -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)

View file

@ -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()