Skip to content

Commit

Permalink
LastActive is null instead of 'Never' when never connected
Browse files Browse the repository at this point in the history
  • Loading branch information
mvalois authored and jayknyn committed Oct 28, 2023
1 parent be95125 commit 5f69436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5f69436

Please sign in to comment.