From e4e59034774d6eba033aeb9d4fd48689b019dbf2 Mon Sep 17 00:00:00 2001 From: "alex.hill@gmail.com" Date: Tue, 3 Sep 2024 17:49:43 +0100 Subject: [PATCH] fix warnings --- DESCRIPTION | 1 + R/api.R | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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