From e904bbbca32614da95384d11f6ad5e53ea1e0036 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Mon, 6 Nov 2017 14:51:28 +0100 Subject: Use plural nouns for all routes. --- lib/agent/apiv1-sdks.go | 2 +- lib/agent/apiv1.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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) -- cgit 1.2.3-korg