add source code and format
This commit is contained in:
parent
2e3750121a
commit
d0eb3b6573
5 changed files with 7 additions and 6 deletions
|
@ -7,8 +7,6 @@ pub struct Migrator;
|
||||||
#[async_trait::async_trait]
|
#[async_trait::async_trait]
|
||||||
impl MigratorTrait for Migrator {
|
impl MigratorTrait for Migrator {
|
||||||
fn migrations() -> Vec<Box<dyn MigrationTrait>> {
|
fn migrations() -> Vec<Box<dyn MigrationTrait>> {
|
||||||
vec![
|
vec![Box::new(m20241106_212353_create_table::Migration)]
|
||||||
Box::new(m20241106_212353_create_table::Migration),
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,9 @@ async fn index(Extension(user): Extension<UserSession>) -> impl IntoResponse {
|
||||||
<input name="password" type="password" placeholder="Enter password" required />
|
<input name="password" type="password" placeholder="Enter password" required />
|
||||||
<button type="submit">Set password</button>
|
<button type="submit">Set password</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://git.zeus.gent/ZeusWPI/mailauth"> Source Code </a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"#,
|
"#,
|
||||||
|
|
|
@ -5,5 +5,5 @@ pub struct JWTPayload {
|
||||||
pub sub: String,
|
pub sub: String,
|
||||||
pub iat: usize,
|
pub iat: usize,
|
||||||
pub exp: usize,
|
pub exp: usize,
|
||||||
pub preferred_username: String
|
pub preferred_username: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct UserSession {
|
pub struct UserSession {
|
||||||
pub name: String
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
|
pub mod auth;
|
||||||
pub mod middelware;
|
pub mod middelware;
|
||||||
pub mod user;
|
pub mod user;
|
||||||
pub mod auth;
|
|
||||||
|
|
Loading…
Reference in a new issue