diff --git a/R/synapse_rest_api.R b/R/synapse_rest_api.R index ea390b94..94cac87f 100644 --- a/R/synapse_rest_api.R +++ b/R/synapse_rest_api.R @@ -38,7 +38,10 @@ synapse_is_certified <- function(url="https://repo-prod.prod.sagebase.org/repo/v ownerid <- user_profile[["ownerId"]] url_req <- file.path(url, ownerid, endpoint) req <- httr::GET(url_req) - httr::content(req)[["passed"]] + resp <- httr::content(req) + if ("certified" %in% names(resp)) { + return(resp[["certified"]]) + } else return(FALSE) } diff --git a/functions/synapse_rest_api.R b/functions/synapse_rest_api.R index ea390b94..94cac87f 100644 --- a/functions/synapse_rest_api.R +++ b/functions/synapse_rest_api.R @@ -38,7 +38,10 @@ synapse_is_certified <- function(url="https://repo-prod.prod.sagebase.org/repo/v ownerid <- user_profile[["ownerId"]] url_req <- file.path(url, ownerid, endpoint) req <- httr::GET(url_req) - httr::content(req)[["passed"]] + resp <- httr::content(req) + if ("certified" %in% names(resp)) { + return(resp[["certified"]]) + } else return(FALSE) }