diff --git a/DESCRIPTION b/DESCRIPTION index a3d82c3..544bd38 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,6 +20,7 @@ Imports: mime, plumber, porcelain, + rlang, stringr, tibble Remotes: diff --git a/R/api.R b/R/api.R index 2b5114c..a4368d3 100644 --- a/R/api.R +++ b/R/api.R @@ -50,7 +50,7 @@ target_post_dataset <- function(req, res) { dir.create(path, recursive = TRUE) utils::write.csv(file_body, file.path(path, "data"), row.names = FALSE) write(xcol, file.path(path, "xcol")) - porcelain:::response_success(jsonlite::unbox(filename)) + response_success(jsonlite::unbox(filename)) } target_get_dataset <- function(name, req) { @@ -198,3 +198,9 @@ generate_session_id <- function() { 5, replace = TRUE)))))) } + +response_success <- function(data) +{ + list(status = jsonlite::unbox("success"), errors = NULL, + data = data) +} \ No newline at end of file