Get and store steam username and display it on the homepage

This commit is contained in:
Lol3rrr
2024-09-10 17:48:06 +02:00
parent d3658be232
commit 9a033b7190
15 changed files with 528 additions and 103 deletions

View File

@@ -5,7 +5,7 @@ use diesel::prelude::*;
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct Session {
pub id: Vec<i64>,
pub data: serde_json::Value,
pub steamid: Option<String>,
pub expiry_date: String,
}
@@ -16,3 +16,11 @@ pub struct Demo {
pub steam_id: i64,
pub demo_id: i64,
}
#[derive(Queryable, Selectable, Insertable, Debug)]
#[diesel(table_name = crate::schema::users)]
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct User {
pub steamid: String,
pub name: String,
}