diff --git a/server/src/auth.rs b/server/src/auth.rs index 6742761..2878691 100644 --- a/server/src/auth.rs +++ b/server/src/auth.rs @@ -145,12 +145,13 @@ pub fn login(conn: DBConn, api_key: Form) -> AuthResult Ok(json!({"key": data})), + Some(data) => Ok(json!({"key": encode_param(&data)})), None => Err(AuthErr { msg: "Could not create session", status: 500 diff --git a/server/src/models.rs b/server/src/models.rs index c4cddbe..a679030 100644 --- a/server/src/models.rs +++ b/server/src/models.rs @@ -30,7 +30,7 @@ pub struct User { } pub const USER_OFFLINE: i32 = 1; -pub const USER_ONLINE: i32 = 2; +pub const _USER_ONLINE: i32 = 2; pub const _USER_AWAY: i32 = 3; pub const _USER_DO_NOT_DISTRUB: i32 = 4;