Skip to content

Commit

Permalink
fix for blank first argument in the query string
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Feb 28, 2024
1 parent 1b7e7f6 commit 6879731
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/body.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ setGemmaPath <- function(path){
call <- quote(paste0(gemmaPath(), gsub("/((NA)?/)", "/", gsub("\\?[^=]+=NA", "\\?", gsub("&[^=]+=NA", "", glue::glue(endpoint)))))) %>% eval(envir = envWhere)

# remove empty parameters
call<- call %>% stringr::str_split('&') %>%
call<- call %>% stringr::str_split('&|\\?') %>%
{.[[1]]} %>% {.[!grepl("\\=$",.)]} %>%
{c(paste(.[1],.[2],sep = "?"),.[c(-1,-2)])} %>%
paste0(collapse = '&')

if (!is.null(getOption('gemma.username')) && !is.null(getOption('gemma.password'))){
Expand Down

0 comments on commit 6879731

Please sign in to comment.