Make snapshot diff GET, not POST (as it doesn't change anything in the system). #168

This commit is contained in:
Andrey Smirnov
2015-01-24 21:51:33 +03:00
parent d828732307
commit ebea4f10a0
3 changed files with 6 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ func Router(c *ctx.AptlyContext) http.Handler {
root.GET("/snapshots/:name", apiSnapshotsShow)
root.GET("/snapshots/:name/packages", apiSnapshotsSearchPackages)
root.DELETE("/snapshots/:name", apiSnapshotsDrop)
root.POST("/snapshots/:name/diff/:withSnapshot", apiSnapshotsDiff)
root.GET("/snapshots/:name/diff/:withSnapshot", apiSnapshotsDiff)
}
{

View File

@@ -333,7 +333,7 @@ func apiSnapshotsDrop(c *gin.Context) {
c.JSON(200, gin.H{})
}
// POST /api/snapshots/:name/diff/:name2
// GET /api/snapshots/:name/diff/:withSnapshot
func apiSnapshotsDiff(c *gin.Context) {
onlyMatching := c.Request.URL.Query().Get("onlyMatching") == "1"