adding more server/client communication commands, need to fix echo path params

This commit is contained in:
2020-06-08 20:55:34 -04:00
parent b2238657c8
commit c2e74ce7f4
10 changed files with 111 additions and 33 deletions

View File

@@ -49,7 +49,10 @@ func main() {
server.Echo = e
//Start the routes
//e.GET("/hello", server.Hello)
e.GET("/info/:repoName", server.GetInfo)
e.GET("/lock/:type/:name", server.LockFile)
e.GET("/:repo/info/", server.GetInfo)
e.GET("/:repo/lock/:type/:name", server.LockFile)
e.GET("/:repo/refresh", server.Refresh)
e.GET("/:repo/revert/:hash", server.Revert) // TODO: Might not need this, just add extra args to pull?
e.GET("/:repo/pull/:branch", server.Pull)
e.Logger.Fatal(e.Start(fmt.Sprintf("%s:%d", server.Config.BindIP, server.Config.Port)))
}