From e7b96d9bd51539f17f8728df7b6aab05648bf385 Mon Sep 17 00:00:00 2001 From: dal Date: Tue, 11 Feb 2025 10:58:25 -0700 Subject: [PATCH] make a chart card --- .../rest/routes/datasets/list_datasets.rs | 5 +---- api/src/routes/ws/datasets/list_datasets.rs | 19 +++---------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/api/src/routes/rest/routes/datasets/list_datasets.rs b/api/src/routes/rest/routes/datasets/list_datasets.rs index 7b68c015b..47737c001 100644 --- a/api/src/routes/rest/routes/datasets/list_datasets.rs +++ b/api/src/routes/rest/routes/datasets/list_datasets.rs @@ -181,7 +181,6 @@ async fn get_org_datasets( users::email, data_sources::id, data_sources::name, - sql::>("max(messages.created_at) as last_queried"), )) .group_by(( datasets::id, @@ -229,7 +228,6 @@ async fn get_org_datasets( String, Uuid, String, - Option>, )>(&mut conn) .await { @@ -252,7 +250,6 @@ async fn get_org_datasets( user_email, data_source_id, data_source_name, - last_queried, )| { ListDatasetObject { id, @@ -265,7 +262,7 @@ async fn get_org_datasets( id: data_source_id, name: data_source_name, }, - last_queried, + last_queried: None, owner: Some(ListDatasetOwner { id: user_id, name: user_name.unwrap_or(user_email), diff --git a/api/src/routes/ws/datasets/list_datasets.rs b/api/src/routes/ws/datasets/list_datasets.rs index 6d53e0d56..964bc0252 100644 --- a/api/src/routes/ws/datasets/list_datasets.rs +++ b/api/src/routes/ws/datasets/list_datasets.rs @@ -236,7 +236,6 @@ async fn get_user_permissioned_datasets( users::email, data_sources::id, data_sources::name, - sql::>("max(messages.created_at) as last_queried"), )) .group_by(( datasets::id, @@ -271,7 +270,6 @@ async fn get_user_permissioned_datasets( String, Uuid, String, - Option>, )>(&mut conn) .await { @@ -294,7 +292,6 @@ async fn get_user_permissioned_datasets( user_email, data_source_id, data_source_name, - last_queried, )| { ListDatasetObject { id, @@ -307,7 +304,7 @@ async fn get_user_permissioned_datasets( id: data_source_id, name: data_source_name, }, - last_queried, + last_queried: None, owner: Some(ListDatasetOwner { id: user_id, name: user_name.unwrap_or(user_email), @@ -351,7 +348,6 @@ async fn get_org_datasets( users::email, data_sources::id, data_sources::name, - sql::>("max(messages.created_at) as last_queried"), )) .group_by(( datasets::id, @@ -397,7 +393,6 @@ async fn get_org_datasets( String, Uuid, String, - Option>, )>(&mut conn) .await { @@ -420,7 +415,6 @@ async fn get_org_datasets( user_email, data_source_id, data_source_name, - last_queried, )| { ListDatasetObject { id, @@ -433,7 +427,7 @@ async fn get_org_datasets( id: data_source_id, name: data_source_name, }, - last_queried, + last_queried: None, owner: Some(ListDatasetOwner { id: user_id, name: user_name.unwrap_or(user_email), @@ -542,7 +536,6 @@ async fn get_restricted_user_datasets( users::email, data_sources::id, data_sources::name, - sql::>("max(messages.created_at) as last_queried"), )) .group_by(( datasets::id, @@ -575,7 +568,6 @@ async fn get_restricted_user_datasets( String, Uuid, String, - Option>, )>(&mut conn) .await { @@ -608,7 +600,6 @@ async fn get_restricted_user_datasets( String, Uuid, String, - Option>, )> = match datasets::table .inner_join(data_sources::table.on(datasets::data_source_id.eq(data_sources::id))) .inner_join(users::table.on(datasets::created_by.eq(users::id))) @@ -632,7 +623,6 @@ async fn get_restricted_user_datasets( users::email, data_sources::id, data_sources::name, - sql::>("max(messages.created_at) as last_queried"), )) .group_by(( datasets::id, @@ -668,7 +658,6 @@ async fn get_restricted_user_datasets( String, Uuid, String, - Option>, )>(&mut conn) .await { @@ -692,7 +681,6 @@ async fn get_restricted_user_datasets( String, Uuid, String, - Option>, )> = Vec::new(); match direct_user_permissioned_datasets_handle.await { @@ -728,7 +716,6 @@ async fn get_restricted_user_datasets( user_email, data_source_id, data_source_name, - last_queried, )| { ListDatasetObject { id, @@ -741,7 +728,7 @@ async fn get_restricted_user_datasets( id: data_source_id, name: data_source_name, }, - last_queried, + last_queried: None, owner: Some(ListDatasetOwner { id: user_id, name: user_name.unwrap_or(user_email),