holy shit minio
This commit is contained in:
parent
dc2d283ec1
commit
8a48cab347
2 changed files with 20 additions and 4 deletions
|
|
@ -102,19 +102,19 @@ async fn launch() -> _ {
|
|||
.connect(&act_database_url).await
|
||||
.expect("unable to create pool");
|
||||
|
||||
static S3_URL_STRING: Lazy<Box<str>> = Lazy::new(||
|
||||
pub static S3_URL_STRING: Lazy<Box<str>> = Lazy::new(||
|
||||
env::var("S3_URL").expect("S3_URL not specified").into_boxed_str()
|
||||
);
|
||||
|
||||
static S3_URL: Lazy<BaseUrl> = Lazy::new(||
|
||||
pub static S3_URL: Lazy<BaseUrl> = Lazy::new(||
|
||||
S3_URL_STRING.parse().unwrap()
|
||||
);
|
||||
|
||||
static S3_USER: Lazy<Box<str>> = Lazy::new(||
|
||||
pub 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(||
|
||||
pub static S3_PASSWD: Lazy<Box<str>> = Lazy::new(||
|
||||
env::var("S3_PASSWD").expect("S3_PASSWD not specified").into_boxed_str()
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,22 @@ const DATABASE_ERROR: Errors = Errors{
|
|||
]
|
||||
};
|
||||
|
||||
pub static S3_URL_STRING: Lazy<Box<str>> = Lazy::new(||
|
||||
env::var("S3_URL").expect("S3_URL not specified").into_boxed_str()
|
||||
);
|
||||
|
||||
pub static S3_URL: Lazy<BaseUrl> = Lazy::new(||
|
||||
S3_URL_STRING.parse().unwrap()
|
||||
);
|
||||
|
||||
pub static S3_USER: Lazy<Box<str>> = Lazy::new(||
|
||||
env::var("S3_USER").expect("S3_USER not specified").into_boxed_str()
|
||||
);
|
||||
|
||||
pub 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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue