fix: postgres
This commit is contained in:
parent
dcd5f359c6
commit
27d7c2f4b5
29 changed files with 298 additions and 224 deletions
|
@ -188,6 +188,8 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
|
|||
|
||||
/// Set up extra directories.
|
||||
pub(crate) async fn init_dirs(config: &Config) {
|
||||
create_dir_if_not_exists!(&config.dirs.templates);
|
||||
|
||||
// images
|
||||
create_dir_if_not_exists!(&config.dirs.media);
|
||||
let images_path = PathBufD::current().extend(&[config.dirs.media.as_str(), "images"]);
|
||||
|
|
|
@ -73,7 +73,7 @@ pub async fn avatar_request(
|
|||
let path = PathBufD::current().extend(&[
|
||||
data.0.dirs.media.as_str(),
|
||||
"avatars",
|
||||
&format!("{}.avif", &user.id),
|
||||
&format!("{}.avif", &(user.id as i64)),
|
||||
]);
|
||||
|
||||
if !exists(&path).unwrap() {
|
||||
|
@ -118,7 +118,7 @@ pub async fn banner_request(
|
|||
let path = PathBufD::current().extend(&[
|
||||
data.0.dirs.media.as_str(),
|
||||
"banners",
|
||||
&format!("{}.avif", &user.id),
|
||||
&format!("{}.avif", &(user.id as i64)),
|
||||
]);
|
||||
|
||||
if !exists(&path).unwrap() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue