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] #[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),
]
} }
} }

View file

@ -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>
"#, "#,

View file

@ -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,
} }

View file

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

View file

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