use reactlog::reactlog_add_shiny_resource_paths

This commit is contained in:
Barret Schloerke
2018-12-11 17:12:38 -05:00
parent 26a136a6e8
commit b4bef0d32c
3 changed files with 3 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ Suggests:
markdown,
rmarkdown,
ggplot2,
reactlog (>= 0.0.0.9000),
reactlog (>= 0.0.0.9001),
magrittr
URL: http://shiny.rstudio.com
BugReports: https://github.com/rstudio/shiny/issues

View File

@@ -25,15 +25,11 @@ reactLogHandler <- function(req) {
sessionToken <- parseQueryString(req$QUERY_STRING)$s
# `renderReactLog` will check/throw if reactlog doesn't exist
reactlogFile <- renderReactLog(sessionToken)
# add asset path after reactlog has been calculated (makes sure package exists)
if (!hasResourcePath("reactlogAsset")) {
addResourcePath(
"reactlogAsset",
system.file("reactlogAsset", package = "reactlog")
)
}
reactlog::reactlog_add_shiny_resource_paths()
return(httpResponse(
status = 200,

View File

@@ -72,9 +72,6 @@ addResourcePath <- function(prefix, directoryPath) {
)
}
hasResourcePath <- function(prefix) {
!is.null(.globals$resources[[prefix]])
}
resourcePathHandler <- function(req) {
if (!identical(req$REQUEST_METHOD, 'GET'))