summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 14:51:28 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-06 14:51:28 +0100
commite904bbbca32614da95384d11f6ad5e53ea1e0036 (patch)
tree146e52e1ed51ddf86120992fe0e6aeddbbcda0de /lib
parenta58e296c780f3f9f3a8f71a27cef0d202b13674b (diff)
Use plural nouns for all routes.
Diffstat (limited to 'lib')
-rw-r--r--lib/agent/apiv1-sdks.go2
-rw-r--r--lib/agent/apiv1.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/agent/apiv1-sdks.go b/lib/agent/apiv1-sdks.go
index ee6409d..73ad2af 100644
--- a/lib/agent/apiv1-sdks.go
+++ b/lib/agent/apiv1-sdks.go
@@ -3,7 +3,7 @@ package agent
// sdksPassthroughInit Declare passthrough routes for sdks
func (s *APIService) sdksPassthroughInit(svr *XdsServer) error {
svr.PassthroughGet("/sdks")
- svr.PassthroughGet("/sdk/:id")
+ svr.PassthroughGet("/sdks/:id")
return nil
}
diff --git a/lib/agent/apiv1.go b/lib/agent/apiv1.go
index 3fd9990..3e742f5 100644
--- a/lib/agent/apiv1.go
+++ b/lib/agent/apiv1.go
@@ -33,10 +33,10 @@ func NewAPIV1(ctx *Context) *APIService {
s.apiRouter.GET("/browse", s.browseFS)
s.apiRouter.GET("/projects", s.getProjects)
- s.apiRouter.GET("/project/:id", s.getProject)
- s.apiRouter.POST("/project", s.addProject)
- s.apiRouter.POST("/project/sync/:id", s.syncProject)
- s.apiRouter.DELETE("/project/:id", s.delProject)
+ s.apiRouter.GET("/projects/:id", s.getProject)
+ s.apiRouter.POST("/projects", s.addProject)
+ s.apiRouter.POST("/projects/sync/:id", s.syncProject)
+ s.apiRouter.DELETE("/projects/:id", s.delProject)
s.apiRouter.POST("/exec", s.execCmd)
s.apiRouter.POST("/exec/:id", s.execCmd)