Minor changes
This commit is contained in:
parent
ed54a2391b
commit
b48af7e211
2 changed files with 5 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
|||
mod app_state;
|
||||
mod cli;
|
||||
mod config;
|
||||
mod consts;
|
||||
mod database;
|
||||
mod errors;
|
||||
mod server;
|
||||
mod utils;
|
||||
|
|
@ -20,13 +20,8 @@ async fn main() -> Result<(), SyncServerError> {
|
|||
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| {
|
||||
format!(
|
||||
"{}=debug,tower_http=debug,axum::rejection=trace",
|
||||
env!("CARGO_CRATE_NAME")
|
||||
)
|
||||
.into()
|
||||
}),
|
||||
tracing_subscriber::EnvFilter::try_from_default_env()
|
||||
.unwrap_or_else(|_| format!("{}=debug", env!("CARGO_CRATE_NAME")).into()),
|
||||
)
|
||||
.with(tracing_subscriber::fmt::layer())
|
||||
.try_init()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use super::app_state::AppState;
|
||||
use crate::{
|
||||
app_state::AppState,
|
||||
config::user_config::User,
|
||||
errors::{SyncServerError, unauthorized_error},
|
||||
};
|
||||
|
||||
// TODO: turn this into a middleware
|
||||
pub fn auth(app_state: &AppState, token: &str) -> Result<User, SyncServerError> {
|
||||
app_state
|
||||
.config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue