mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-14 09:57:16 +00:00
Add -force-drop to aptly publish drop, ?force=1 to DELETE publish/... to drop
published repositories even if cleanup fails. #153
This commit is contained in:
1 parent
d5c6f0b623
commit
f8bca463bb
3 files changed
+11
-4
No files matched your search
+3
-1
@@ -312,6 +312,8 @@ func apiPublishUpdateSwitch(c *gin.Context) {
|
||||
|
||||
// DELETE /publish/:prefix/:distribution
|
||||
func apiPublishDrop(c *gin.Context) {
|
||||
force := c.Request.URL.Query().Get("force") == "1"
|
||||
|
||||
param := parseEscapedPath(c.Params.ByName("prefix"))
|
||||
storage, prefix := deb.ParsePrefix(param)
|
||||
distribution := c.Params.ByName("distribution")
|
||||
@@ -326,7 +328,7 @@ func apiPublishDrop(c *gin.Context) {
|
||||
defer collection.Unlock()
|
||||
|
||||
err := collection.Remove(context, storage, prefix, distribution,
|
||||
context.CollectionFactory(), context.Progress())
|
||||
context.CollectionFactory(), context.Progress(), force)
|
||||
if err != nil {
|
||||
c.Fail(500, fmt.Errorf("unable to drop: %s", err))
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user