We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0af6a2 commit b5b0a52Copy full SHA for b5b0a52
api/router.go
@@ -140,6 +140,10 @@ func Router(c *ctx.AptlyContext) http.Handler {
140
api.POST("/gpg/key", apiGPGAddKey)
141
}
142
143
+ {
144
+ api.GET("/s3", apiS3List)
145
+ }
146
+
147
{
148
api.GET("/files", apiFilesListDirs)
149
api.POST("/files/:dir", apiFilesUpload)
api/s3.go
@@ -0,0 +1,14 @@
1
+package api
2
3
+import (
4
+ "github.com/gin-gonic/gin"
5
+)
6
7
+// GET /api/s3
8
+func apiS3List(c *gin.Context) {
9
+ keys := []string{}
10
+ for k := range context.Config().S3PublishRoots {
11
+ keys = append(keys, k)
12
13
+ c.JSON(200, keys)
14
+}
0 commit comments