Skip to content

Commit

Permalink
fix: Adjust payload format for PHP endpoints (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 authored Jan 2, 2025
1 parent 77cc7d7 commit 80d8be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/dev_server/sdk/get_server_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func GetServerFlags(w http.ResponseWriter, r *http.Request) {
http.Error(w, "flag not found", http.StatusNotFound)
}
} else {
body = ServerAllPayloadFromFlagsState(allFlags)
body = ServerFlagsFromFlagsState(allFlags)
}
jsonBody, err := json.Marshal(body)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions internal/dev_server/sdk/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func BindRoutes(router *mux.Router) {

router.Handle("/all", GetProjectKeyFromAuthorizationHeader(http.HandlerFunc(StreamServerAllPayload)))

router.PathPrefix("/sdk/flags/{flagKey}").
Methods(http.MethodGet).
Handler(GetProjectKeyFromAuthorizationHeader(http.HandlerFunc(GetServerFlags)))
router.PathPrefix("/sdk/flags").
Methods(http.MethodGet).
Handler(GetProjectKeyFromAuthorizationHeader(http.HandlerFunc(GetServerFlags)))
Expand Down

0 comments on commit 80d8be2

Please sign in to comment.