add source code and format

This commit is contained in:
Xander Bil 2024-11-13 23:53:16 +01:00
parent 2e3750121a
commit d0eb3b6573
No known key found for this signature in database
GPG key ID: EC9706B54A278598
5 changed files with 7 additions and 6 deletions

View file

@ -7,8 +7,6 @@ pub struct Migrator;
#[async_trait::async_trait]
impl MigratorTrait for Migrator {
fn migrations() -> Vec<Box<dyn MigrationTrait>> {
vec![
Box::new(m20241106_212353_create_table::Migration),
]
vec![Box::new(m20241106_212353_create_table::Migration)]
}
}

View file

@ -38,6 +38,9 @@ async fn index(Extension(user): Extension<UserSession>) -> impl IntoResponse {
<input name="password" type="password" placeholder="Enter password" required />
<button type="submit">Set password</button>
</form>
<a href="https://git.zeus.gent/ZeusWPI/mailauth"> Source Code </a>
</body>
</html>
"#,

View file

@ -5,5 +5,5 @@ pub struct JWTPayload {
pub sub: String,
pub iat: usize,
pub exp: usize,
pub preferred_username: String
pub preferred_username: String,
}

View file

@ -1,4 +1,4 @@
#[derive(Clone)]
pub struct UserSession {
pub name: String
pub name: String,
}

View file

@ -1,3 +1,3 @@
pub mod auth;
pub mod middelware;
pub mod user;
pub mod auth;