Skip to content

Commit

Permalink
Update delete_project.R
Browse files Browse the repository at this point in the history
use getip package to log the ip address
  • Loading branch information
saipavan10-git committed Dec 5, 2024
1 parent abd49f8 commit 5144a33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/delete_project.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ delete_project <- function(project_id, conn) {

# Define logging parameters
ts <- format(Sys.time(), "%Y%m%d%H%M%S") # Time stamp
user <- "admin" # Placeholder for user
ip <- "192.168.65.1" # Placeholder for IP address
user <- ifelse(is.null(get_script_name()), "admin", get_script_name())
ip <- getip::getip("local")
page <- "rcc.billing::delete_abandoned_projects"
event <- "MANAGE"
object_type <- "redcap_projects"
Expand Down Expand Up @@ -102,7 +102,7 @@ delete_project <- function(project_id, conn) {
data_values,
description,
legacy,
ifelse(is.null(change_reason), "NULL", sprintf("'%s'", change_reason)) # Change reason
ifelse(is.null(change_reason), "NULL", sprintf("'%s'", change_reason))
)
)
}
Expand Down

0 comments on commit 5144a33

Please sign in to comment.