From d0eb3b6573e698d3b8742e0008ae5b75f4e3083b Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Wed, 13 Nov 2024 23:53:16 +0100 Subject: [PATCH] add source code and format --- migration/src/lib.rs | 4 +--- src/main.rs | 3 +++ src/models/jwt.rs | 2 +- src/models/user.rs | 2 +- src/routes/mod.rs | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/migration/src/lib.rs b/migration/src/lib.rs index 3c373d8..95e098f 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -7,8 +7,6 @@ pub struct Migrator; #[async_trait::async_trait] impl MigratorTrait for Migrator { fn migrations() -> Vec> { - vec![ - Box::new(m20241106_212353_create_table::Migration), - ] + vec![Box::new(m20241106_212353_create_table::Migration)] } } diff --git a/src/main.rs b/src/main.rs index 0d07225..e227844 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,6 +38,9 @@ async fn index(Extension(user): Extension) -> impl IntoResponse { + + + Source Code "#, diff --git a/src/models/jwt.rs b/src/models/jwt.rs index ae92cae..01173f5 100644 --- a/src/models/jwt.rs +++ b/src/models/jwt.rs @@ -5,5 +5,5 @@ pub struct JWTPayload { pub sub: String, pub iat: usize, pub exp: usize, - pub preferred_username: String + pub preferred_username: String, } diff --git a/src/models/user.rs b/src/models/user.rs index f7ffd8d..a494691 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -1,4 +1,4 @@ #[derive(Clone)] pub struct UserSession { - pub name: String + pub name: String, } diff --git a/src/routes/mod.rs b/src/routes/mod.rs index a10b118..2ed4187 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,3 +1,3 @@ +pub mod auth; pub mod middelware; pub mod user; -pub mod auth;