Skip to content

Commit

Permalink
Fix cloud download bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hcorson-dosch-usgs committed Jun 30, 2022
1 parent 3076c8e commit 313bd96
Showing 1 changed file with 1 addition and 4 deletions.
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 313bd96

Please sign in to comment.