Ajouter framework de documentation #35

Merged
vlbeaudoin merged 10 commits from feature/minio into main 2023-04-24 16:44:33 -04:00
Showing only changes of commit 7accc596c7 - Show all commits

View file

@ -181,6 +181,17 @@ func handleV1Seed(c echo.Context) error {
var new_buckets []string var new_buckets []string
for _, bucket := range documents_buckets { for _, bucket := range documents_buckets {
exists, err := client.BucketExists(context.Background(), bucket)
if err != nil {
return c.JSON(http.StatusInternalServerError, map[string]string{
"message": "Error during minio#BucketExists",
})
}
if exists {
continue
}
if err = client.MakeBucket(context.Background(), bucket, minio.MakeBucketOptions{}); err != nil { if err = client.MakeBucket(context.Background(), bucket, minio.MakeBucketOptions{}); err != nil {
return c.JSON(http.StatusInternalServerError, map[string]string{ return c.JSON(http.StatusInternalServerError, map[string]string{
"message": "Error during minio#MakeBucket", "message": "Error during minio#MakeBucket",