[server] Add API to return feature flags value

This commit is contained in:
Neeraj Gupta
2024-04-22 16:57:00 +05:30
parent 5b4d66933e
commit 3fbf6674fe
3 changed files with 73 additions and 3 deletions

View File

@@ -49,3 +49,13 @@ func (h *RemoteStoreHandler) GetKey(c *gin.Context) {
}
c.JSON(http.StatusOK, resp)
}
// GetFeatureFlags returns all the feature flags and value for given user
func (h *RemoteStoreHandler) GetFeatureFlags(c *gin.Context) {
resp, err := h.Controller.GetFeatureFlags(c)
if err != nil {
handler.Error(c, stacktrace.Propagate(err, "failed to get feature flags"))
return
}
c.JSON(http.StatusOK, resp)
}