moving away from db_types in the members api module

This commit is contained in:
shockrah 2020-11-07 13:26:37 -08:00
parent ec30e80ac1
commit cb69d8b945

View File

@ -4,7 +4,8 @@ use mysql_async::{Conn, Pool, error::Error as SqlError};
use mysql_async::prelude::{params, Queryable};
use serde::Serialize;
use crate::db_types::{UBigInt, BigInt, Integer, VarChar};
use db::{UBigInt, BigInt, Integer, VarChar};
use db::member::{STATUS_ONLINE, STATUS_OFFLINE};
use crate::auth;
#[derive(Serialize)]
@ -17,10 +18,6 @@ pub struct Member {
pub permissions: UBigInt,
}
const STATUS_ONLINE: Integer = 0;
const _STATUS_OFFLINE: Integer = 1;
const _STATUS_AWAY: Integer = 2;
const _STATUS_DO_NOT_DISTURB: Integer = 3;
pub async fn insert_new_member(p: &Pool, name: VarChar, perms: u64) -> Result<Member, SqlError> {
use crate::auth::generate_secret;