feat: remove teh temp setup

This commit is contained in:
silver 2024-09-16 17:07:03 +01:00
parent fd32adb138
commit 0e1a7d56b6
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
4 changed files with 4 additions and 336 deletions

View file

@ -202,25 +202,11 @@ impl<'r> FromRow<'r, SqliteRow> for WolvesVerify {
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[derive(Debug, Clone, sqlx::FromRow)]
pub struct Committee {
pub email: String,
pub discord: UserId,
pub auth_code: String,
pub committee: i64,
}
impl<'r> FromRow<'r, SqliteRow> for Committee {
fn from_row(row: &'r SqliteRow) -> Result<Self, Error> {
let user_tmp: i64 = row.try_get("discord")?;
let discord = UserId::from(user_tmp as u64);
Ok(Self {
email: row.try_get("email")?,
discord,
auth_code: row.try_get("auth_code")?,
committee: row.try_get("committee")?,
})
}
pub id: i64,
pub name: UserId,
pub members: Vec<i64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]