Skip to content

Commit

Permalink
Merge pull request #285 from hcorson-dosch/main
Browse files Browse the repository at this point in the history
Fix cloud download bug
  • Loading branch information
wdwatkins authored Jun 30, 2022
2 parents 3076c8e + bf6c3fe commit c9b56a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sbtools
Title: USGS ScienceBase Tools
Maintainer: David Blodgett <[email protected]>
Version: 1.1.18
Version: 1.1.19
Authors@R: c(person("David", "Blodgett", role=c("cre"),
email = "[email protected]"),
person("Luke", "Winslow", role = c("aut"),
Expand Down
5 changes: 1 addition & 4 deletions R/gql_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c9b56a3

Please sign in to comment.