summaryrefslogtreecommitdiff
path: root/src/api/users.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/users.rs')
-rw-r--r--src/api/users.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/api/users.rs b/src/api/users.rs
index 83a0d4e..e3c992b 100644
--- a/src/api/users.rs
+++ b/src/api/users.rs
@@ -3,7 +3,11 @@ use crate::types::{
http::ResponseCode,
user::User,
};
-use axum::{response::Response, routing::{post, put}, Router};
+use axum::{
+ response::Response,
+ routing::{post, put},
+ Router,
+};
use serde::Deserialize;
#[derive(Deserialize)]
@@ -64,7 +68,6 @@ async fn load_self(AuthorizedUser(user): AuthorizedUser) -> Response {
}
async fn avatar(AuthorizedUser(user): AuthorizedUser, Png(img): Png) -> Response {
-
let path = format!("./public/image/custom/avatar/{}.png", user.user_id);
if img.save(path).is_err() {
@@ -75,7 +78,6 @@ async fn avatar(AuthorizedUser(user): AuthorizedUser, Png(img): Png) -> Response
}
async fn banner(AuthorizedUser(user): AuthorizedUser, Png(img): Png) -> Response {
-
let path = format!("./public/image/custom/banner/{}.png", user.user_id);
if img.save(path).is_err() {