s3 api: get publish root list

This commit is contained in:
André Roth
2023-12-29 14:00:12 +01:00
parent a0af6a25aa
commit b5b0a52cbe
2 changed files with 18 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package api
import (
"github.com/gin-gonic/gin"
)
// GET /api/s3
func apiS3List(c *gin.Context) {
keys := []string{}
for k := range context.Config().S3PublishRoots {
keys = append(keys, k)
}
c.JSON(200, keys)
}