Make snapshot creation API more RESTful: accept snapshot name from URL. #116

This commit is contained in:
Andrey Smirnov
2015-02-28 19:32:28 +03:00
parent 4c57c358b7
commit 06dc1ef9a4
3 changed files with 9 additions and 35 deletions
+2 -2
View File
@@ -37,11 +37,11 @@ func Router(c *ctx.AptlyContext) http.Handler {
root.POST("/repos/:name/file/:dir/:file", apiReposPackageFromFile)
root.POST("/repos/:name/file/:dir", apiReposPackageFromDir)
root.POST("/repos/:name/snapshots", apiSnapshotsCreateFromRepository)
root.POST("/repos/:name/snapshots/:snapname", apiSnapshotsCreateFromRepository)
}
{
root.POST("/mirrors/:name/snapshots", apiSnapshotsCreateFromMirror)
root.POST("/mirrors/:name/snapshots/:snapname", apiSnapshotsCreateFromMirror)
}
{