mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
committed by
André Roth
parent
73cdf5417b
commit
14c29ff912
@@ -429,6 +429,17 @@ func apiPublishUpdateSwitch(c *gin.Context) {
|
||||
published.MultiDist = *b.MultiDist
|
||||
}
|
||||
|
||||
revision := published.ObtainRevision()
|
||||
sources := revision.Sources
|
||||
|
||||
if published.SourceKind == deb.SourceSnapshot {
|
||||
for _, snapshotInfo := range b.Snapshots {
|
||||
component := snapshotInfo.Component
|
||||
name := snapshotInfo.Name
|
||||
sources[component] = name
|
||||
}
|
||||
}
|
||||
|
||||
resources := []string{string(published.Key())}
|
||||
taskName := fmt.Sprintf("Update published %s repository %s/%s", published.SourceKind, published.StoragePrefix(), published.Distribution)
|
||||
maybeRunTaskInBackground(c, taskName, resources, func(out aptly.Progress, _ *task.Detail) (*task.ProcessReturnValue, error) {
|
||||
@@ -625,7 +636,7 @@ func apiPublishSourcesList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, revision.ToJSON()["Sources"])
|
||||
c.JSON(http.StatusOK, revision.SourceList())
|
||||
}
|
||||
|
||||
// @Router /api/publish/{prefix}/{distribution}/sources [put]
|
||||
|
||||
Reference in New Issue
Block a user