removed dead code
This commit is contained in:
parent
65532def98
commit
fa04d2d722
@ -16,27 +16,6 @@ pub struct Member {
|
|||||||
pub permissions: UBigInt,
|
pub permissions: UBigInt,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_member_row(p: &Pool, uid: u64) -> Result<Option<Member>, Error> {
|
|
||||||
let conn = p.get_conn().await?;
|
|
||||||
type RowData = (VarChar, VarChar, BigInt, Integer, UBigInt);
|
|
||||||
let (_, db_row) : (Conn, Option<RowData>) = conn.first_exec(
|
|
||||||
"SELECT secret, name, joindate, status, permissions FROM members WHERE id = :id",
|
|
||||||
params!{"id" => uid}
|
|
||||||
).await?;
|
|
||||||
|
|
||||||
if let Some(row) = db_row {
|
|
||||||
return Ok(Some(Member {
|
|
||||||
id: uid,
|
|
||||||
secret: row.0,
|
|
||||||
name: row.1,
|
|
||||||
joindate: row.2,
|
|
||||||
status: row.3,
|
|
||||||
permissions:4,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
return Ok(None)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn insert_new_member(p: &Pool, name: VarChar, perms: u64) -> Result<Member, Error> {
|
pub async fn insert_new_member(p: &Pool, name: VarChar, perms: u64) -> Result<Member, Error> {
|
||||||
use crate::auth::generate_secret;
|
use crate::auth::generate_secret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user