diff --git a/DESCRIPTION b/DESCRIPTION index a1bc75c..a4fa159 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: sbtools Title: USGS ScienceBase Tools Maintainer: David Blodgett -Version: 1.1.18 +Version: 1.1.19 Authors@R: c(person("David", "Blodgett", role=c("cre"), email = "dblodgett@usgs.gov"), person("Luke", "Winslow", role = c("aut"), diff --git a/R/gql_helpers.R b/R/gql_helpers.R index 39d62c8..77e73fc 100644 --- a/R/gql_helpers.R +++ b/R/gql_helpers.R @@ -59,10 +59,7 @@ get_cloud_download_url <- function(cr, gql) { query <- "query getS3DownloadUrl($input: SaveFileInputs){ getS3DownloadUrl(input: $input){ downloadUri }}" - variables <- sprintf('{"input": {"selectedRows": {"cuid": "%s", "key": "%s", "title": "%s", "useForPreview": "%s"}}}', - cr$cuid, cr$key, cr$title, cr$useForPreview) - - variables <- list(input = list(selectedRows = list(cuid = cr$cuid, key = cr$key, title = cr$title, useForPreview = cr$useForPreview))) + variables <- list(input = list(selectedRows = list(cuid = cr$cuid, key = cr$key, title = cr$title, useForPreview = as.logical(cr$useForPreview)))) json <- jsonlite::toJSON(list(query = query, variables = variables), auto_unbox = TRUE)