mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-20 10:57:09 +00:00
publish: check if storage exists
This commit is contained in:
1 parent
29e643cdf6
commit
dd85493b1a
14 files changed
+94
-70
No files matched your search
+6
-1
@@ -60,7 +60,12 @@ func reposServeInAPIMode(c *gin.Context) {
|
||||
storage = "filesystem:" + storage
|
||||
}
|
||||
|
||||
publicPath := context.GetPublishedStorage(storage).(aptly.FileSystemPublishedStorage).PublicPath()
|
||||
ps, err := context.GetPublishedStorage(storage)
|
||||
if err != nil {
|
||||
AbortWithJSONError(c, http.StatusNotFound, err)
|
||||
return
|
||||
}
|
||||
publicPath := ps.(aptly.FileSystemPublishedStorage).PublicPath()
|
||||
c.FileFromFS(pkgpath, http.Dir(publicPath))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user