Add stdin support to /exec
[src/xds/xds-server.git] / lib / apiv1 / apiv1.go
index 7359266..cde2526 100644 (file)
@@ -34,6 +34,7 @@ func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolder *
        }
 
        s.apiRouter.GET("/version", s.getVersion)
+       s.apiRouter.GET("/xdsagent/info", s.getXdsAgentInfo)
 
        s.apiRouter.GET("/config", s.getConfig)
        s.apiRouter.POST("/config", s.setConfig)
@@ -49,10 +50,9 @@ func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolder *
        s.apiRouter.POST("/make", s.buildMake)
        s.apiRouter.POST("/make/:id", s.buildMake)
 
-       /* TODO: to be tested and then enabled
        s.apiRouter.POST("/exec", s.execCmd)
        s.apiRouter.POST("/exec/:id", s.execCmd)
-       */
+       s.apiRouter.POST("/signal", s.execSignalCmd)
 
        return s
 }