We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35f3c79 commit 3354c7aCopy full SHA for 3354c7a
pkg/server/api/config.go
@@ -35,7 +35,12 @@ func (h *HTTPServer) ConfigSet(c *gin.Context) {
35
}
36
37
func (h *HTTPServer) ConfigGet(c *gin.Context) {
38
- c.TOML(http.StatusOK, h.mgr.cfg.GetConfig())
+ switch c.Query("format") {
39
+ case "json":
40
+ c.JSON(http.StatusOK, h.mgr.cfg.GetConfig())
41
+ default:
42
+ c.TOML(http.StatusOK, h.mgr.cfg.GetConfig())
43
+ }
44
45
46
func (h *HTTPServer) registerConfig(group *gin.RouterGroup) {
0 commit comments