fix(minio): small minio fix

This commit is contained in:
Andrea Toska 2025-04-27 11:09:15 +02:00
commit dc2d283ec1
No known key found for this signature in database
GPG key ID: 5B3C83807CCBE9A2
2 changed files with 30 additions and 16 deletions

View file

@ -22,10 +22,6 @@ use minio::s3::client::Client;
use minio::s3::args::PutObjectArgs;
use std::sync::Arc;
static S3_URL_STRING: Lazy<Box<str>> = Lazy::new(||
env::var("S3_URL").expect("S3_URL not specified").into_boxed_str()
);
const DATABASE_ERROR: Errors = Errors{
error: &[
Error{
@ -35,18 +31,6 @@ const DATABASE_ERROR: Errors = Errors{
]
};
static S3_URL: Lazy<BaseUrl> = Lazy::new(||
S3_URL_STRING.parse().unwrap()
);
static S3_USER: Lazy<Box<str>> = Lazy::new(||
env::var("S3_USER").expect("S3_USER not specified").into_boxed_str()
);
static S3_PASSWD: Lazy<Box<str>> = Lazy::new(||
env::var("S3_PASSWD").expect("S3_PASSWD not specified").into_boxed_str()
);
fn get_mii_img_url_path(pid: i32, format: &str) -> String{
format!("mii/{}/main.{}", pid, format)
}