1
0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2024-11-22 02:42:33 +01:00

LastActive is null instead of 'Never' when never connected

This commit is contained in:
Mathieu Valois 2023-10-17 11:18:39 +02:00
parent bf41d74501
commit 30b408eaa9

View File

@ -328,7 +328,7 @@ async fn get_users_json(_token: AdminToken, mut conn: DbConn) -> Json<Value> {
usr["CreatedAt"] = json!(format_naive_datetime_local(&u.created_at, DT_FMT));
usr["LastActive"] = match u.last_active(&mut conn).await {
Some(dt) => json!(format_naive_datetime_local(&dt, DT_FMT)),
None => json!("Never"),
None => json!(None::<String>),
};
users_json.push(usr);
}