merge: mediaclient dans media.go

This commit is contained in:
Victor Lacasse-Beaudoin 2024-08-22 13:29:28 -04:00
parent 7878ac7a59
commit 469f7c0458

View file

@ -1,4 +1,4 @@
package media
package main
import (
"context"
@ -8,7 +8,6 @@ import (
"mime/multipart"
"net/http"
"git.agecem.com/agecem/agecem-org/config"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/spf13/viper"
@ -37,7 +36,7 @@ func NewMediaClient(endpoint, accessKeyId, secretAccessKey string, useSSL bool)
}
func NewMediaClientFromViper() (*MediaClient, error) {
var cfg config.Config
var cfg Config
if err := viper.Unmarshal(&cfg); err != nil {
return nil, err
}
@ -55,7 +54,7 @@ type MediaClient struct {
}
func (m *MediaClient) Seed() ([]string, error) {
var cfg config.Config
var cfg Config
if err := viper.Unmarshal(&cfg); err != nil {
return nil, err
}