mirror of
				https://github.com/dani-garcia/vaultwarden.git
				synced 2025-10-28 00:40:01 +02:00 
			
		
		
		
	Show latest active device as last active on admin page
This commit is contained in:
		| @@ -297,6 +297,11 @@ fn users_overview(_token: AdminToken, conn: DbConn) -> ApiResult<Html<String>> { | ||||
|             usr["cipher_count"] = json!(Cipher::count_owned_by_user(&u.uuid, &conn)); | ||||
|             usr["attachment_count"] = json!(Attachment::count_by_user(&u.uuid, &conn)); | ||||
|             usr["attachment_size"] = json!(get_display_size(Attachment::size_by_user(&u.uuid, &conn) as i32)); | ||||
|             usr["created_at"] = json!(&u.created_at.format("%Y-%m-%d %H:%M:%S").to_string()); | ||||
|             usr["last_active"] = match u.last_active(&conn) { | ||||
|                 Some(timestamp) => json!(timestamp.format("%Y-%m-%d %H:%M:%S").to_string()), | ||||
|                 None => json!("Never") | ||||
|             }; | ||||
|             usr | ||||
|     }).collect(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user