Fix disabled check

This commit is contained in:
ViViDboarder 2019-04-15 09:58:19 -07:00
parent b6c9cae8f3
commit f94f5ae7e0
1 changed files with 2 additions and 3 deletions

View File

@ -9,8 +9,7 @@ use std::time::{Duration, Instant};
const COOKIE_LIFESPAN: Duration = Duration::from_secs(20 * 60);
#[derive(Debug)]
#[derive(Deserialize)]
#[derive(Debug, Deserialize)]
pub struct User {
#[serde(rename = "Email")]
email: String,
@ -25,7 +24,7 @@ impl User {
pub fn is_disabled(&self) -> bool {
// HACK: Magic number
self.status != 2
self.status == 2
}
}