Use POST instead of PUT for source creation.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
This commit is contained in:
Christoph Fiehe
2024-10-09 21:41:54 +02:00
committed by André Roth
parent fa0d2860f0
commit 73cdf5417b
2 changed files with 168 additions and 109 deletions

View File

@@ -191,11 +191,12 @@ func Router(c *ctx.AptlyContext) http.Handler {
api.POST("/publish/:prefix", apiPublishRepoOrSnapshot)
api.PUT("/publish/:prefix/:distribution", apiPublishUpdateSwitch)
api.DELETE("/publish/:prefix/:distribution", apiPublishDrop)
api.GET("/publish/:prefix/:distribution/sources", apiPublishSourceList)
api.POST("/publish/:prefix/:distribution/sources", apiPublishSourcesCreate)
api.GET("/publish/:prefix/:distribution/sources", apiPublishSourcesList)
api.PUT("/publish/:prefix/:distribution/sources", apiPublishSourcesUpdate)
api.DELETE("/publish/:prefix/:distribution/sources", apiPublishSourcesDelete)
api.PUT("/publish/:prefix/:distribution/sources/:component", apiPublishSourceUpdate)
api.DELETE("/publish/:prefix/:distribution/sources/:component", apiPublishSourceDelete)
api.DELETE("/publish/:prefix/:distribution/sources", apiPublishSourcesDelete)
api.POST("/publish/:prefix/:distribution/update", apiPublishUpdate)
}