feat: remove teh temp setup
This commit is contained in:
parent
fd32adb138
commit
0e1a7d56b6
4 changed files with 4 additions and 336 deletions
22
src/lib.rs
22
src/lib.rs
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue