diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-02-01 20:34:22 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-02-01 20:34:22 -0500 |
commit | 2026a8f4579b1db0f6e5e7b11ac33c13969adb6c (patch) | |
tree | daa13419b7227462775e325a4f5f60f2ed33c1da /src/api/users.rs | |
parent | remove b64 imgs (diff) | |
download | xssbook-2026a8f4579b1db0f6e5e7b11ac33c13969adb6c.tar.gz xssbook-2026a8f4579b1db0f6e5e7b11ac33c13969adb6c.tar.bz2 xssbook-2026a8f4579b1db0f6e5e7b11ac33c13969adb6c.zip |
static serve refactor
Diffstat (limited to 'src/api/users.rs')
-rw-r--r-- | src/api/users.rs | 8 |
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() { |