File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ func (s *Server) Start() {
41
41
// init API routes
42
42
groupV1 := s .apiEcho .Group ("/v1" )
43
43
groupV1 .GET ("/flags" , s .flagHandlers .GetAllFeatureFlags )
44
- groupV1 .GET ("/flags/:id" , s .flagHandlers .GetFeatureFlagsByID )
44
+ groupV1 .GET ("/flags/:id" , s .flagHandlers .GetFeatureFlagByID )
45
45
groupV1 .POST ("/flags" , s .flagHandlers .CreateNewFlag )
46
46
groupV1 .PUT ("/flags/:id" , s .flagHandlers .UpdateFlagByID )
47
47
groupV1 .DELETE ("/flags/:id" , s .flagHandlers .DeleteFlagByID )
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ import (
4
4
"database/sql"
5
5
"errors"
6
6
"fmt"
7
+ "github.com/labstack/echo/v4"
7
8
"net/http"
8
9
"time"
9
10
10
11
"github.com/go-feature-flag/app-api/dao"
11
12
"github.com/go-feature-flag/app-api/model"
12
13
"github.com/google/uuid"
13
- "github.com/labstack/echo/v4"
14
14
"github.com/lib/pq"
15
15
)
16
16
@@ -39,7 +39,7 @@ func (f Flags) GetAllFeatureFlags(c echo.Context) error {
39
39
return c .JSON (http .StatusOK , flags )
40
40
}
41
41
42
- // GetFeatureFlagsByID is returning the flag belonging to the given ID
42
+ // GetFeatureFlagByID is returning the flag belonging to the given ID
43
43
// @Summary Return all the information about a flag
44
44
// @Tags Feature Flag management API
45
45
// @Description GET all the information about a flag with a specific .
@@ -48,7 +48,7 @@ func (f Flags) GetAllFeatureFlags(c echo.Context) error {
48
48
// @Failure 404 {object} model.HTTPError "Not Found"
49
49
// @Failure 500 {object} model.HTTPError "Internal server error"
50
50
// @Router /v1/flags/{id} [get]
51
- func (f Flags ) GetFeatureFlagsByID (c echo.Context ) error {
51
+ func (f Flags ) GetFeatureFlagByID (c echo.Context ) error {
52
52
flag , err := f .dao .GetFlagByID (c .Request ().Context (), c .Param ("id" ))
53
53
if err != nil {
54
54
if errors .Is (err , sql .ErrNoRows ) {
You can’t perform that action at this time.
0 commit comments