diff --git a/app/logic/api_utils.R b/app/logic/api_utils.R index 95472b3..36bcfad 100644 --- a/app/logic/api_utils.R +++ b/app/logic/api_utils.R @@ -217,7 +217,7 @@ put_row <- function( ) |> t() |> data.frame() |> - dplyr::filter( + filter( column_name != "created_at" ) @@ -237,6 +237,17 @@ put_row <- function( table_schema ) + input_list <- lapply( + input_list, + function(value) { + if (is.null(value) || (is.character(value) && trimws(value) == "")) { + NA + } else { + value + } + } + ) + request(make_endpoint(endpoint)) |> req_headers( accept = "*/*", diff --git a/app/main.R b/app/main.R index 18b81a4..593938f 100644 --- a/app/main.R +++ b/app/main.R @@ -68,13 +68,7 @@ server <- function(id) { get_data( app_state$selected_table() ) - ) |> select( - id, - everything() - ) |> - select( - -created_at - ) + ) }), total_rows = shiny$eventReactive(app_state$table_data(), { nrow(app_state$table_data()) diff --git a/app/view/mod_selector.R b/app/view/mod_selector.R index a58cdcb..e4af1c4 100644 --- a/app/view/mod_selector.R +++ b/app/view/mod_selector.R @@ -220,8 +220,6 @@ server <- function(id, app_state) { get_data( app_state$selected_table() ) - ) |> select( - id, everything() ) }) } @@ -266,10 +264,7 @@ server <- function(id, app_state) { get_data( app_state$selected_table() ) - ) |> select( - id, everything() - ) |> - select(-created_at) + ) }) }, ignoreInit = TRUE)