Skip to content

Commit

Permalink
check response for certified attribute, otherwise return false
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia committed Jul 30, 2024
1 parent 51297f2 commit 3be5aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/synapse_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ synapse_is_certified <- function(url="https://repo-prod.prod.sagebase.org/repo/v
url_req <- file.path(url, ownerid, endpoint)
req <- httr::GET(url_req)
resp <- httr::content(req)
resp[["certified"]]
if ("certified" %in% names(resp)) {
return(resp[["certified"]])
} else return(FALSE)

}

Expand Down
4 changes: 3 additions & 1 deletion functions/synapse_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ synapse_is_certified <- function(url="https://repo-prod.prod.sagebase.org/repo/v
url_req <- file.path(url, ownerid, endpoint)
req <- httr::GET(url_req)
resp <- httr::content(req)
resp[["certified"]]
if ("certified" %in% names(resp)) {
return(resp[["certified"]])
} else return(FALSE)

}

Expand Down

0 comments on commit 3be5aac

Please sign in to comment.