Skip to content

Commit

Permalink
Move constants to constants dir
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Jul 2, 2024
1 parent 74e6252 commit 47ce809
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/constants/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub const CDN_ROOT: &str = "cdn_root";
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod constants;
mod env;
mod utils;

Expand All @@ -7,6 +8,7 @@ use axum::{
routing::get,
Router,
};
use constants::CDN_ROOT;
use env::state::AppState;
use reqwest::StatusCode;
use std::path::PathBuf;
Expand All @@ -21,8 +23,6 @@ use utils::{
path::{get_original_path, get_resize_width_from_path},
};

const CDN_ROOT: &str = "cdn_root";

async fn handle_files_request(
State(state): State<AppState>,
Path(path): Path<String>,
Expand Down

0 comments on commit 47ce809

Please sign in to comment.