refactor: небольшие изменения кода
This commit is contained in:
10
app.R
10
app.R
@@ -118,9 +118,9 @@ server <- function(input, output, session) {
|
|||||||
if (AUTH_ENABLED) {
|
if (AUTH_ENABLED) {
|
||||||
reactiveValuesToList(res_auth)
|
reactiveValuesToList(res_auth)
|
||||||
if (res_auth$admin) {
|
if (res_auth$admin) {
|
||||||
print("admin")
|
# print("admin")
|
||||||
} else {
|
} else {
|
||||||
print("not_admin")
|
# print("not_admin")
|
||||||
showing_buttons <- FALSE
|
showing_buttons <- FALSE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,8 +234,8 @@ server <- function(input, output, session) {
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
nested_key_id <- mhcs()$get_key_id(table_name)
|
nested_key_id <- mhcs()$get_key_id(table_name)
|
||||||
input_types <- unname(id_and_types_list)
|
input_types <- unname(id_and_types_list)
|
||||||
input_ids <- names(id_and_types_list)
|
input_ids <- names(id_and_types_list)
|
||||||
|
|
||||||
if (missing(ns)) ns <- NULL
|
if (missing(ns)) ns <- NULL
|
||||||
|
|
||||||
@@ -1138,7 +1138,7 @@ server <- function(input, output, session) {
|
|||||||
append = TRUE
|
append = TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
message <- glue::glue("Данные таблицы '{table_name}' успешно обновлены")
|
message <- glue::glue("Данные таблицы '{table_name}' успешно обновлены (добавлено {nrow(df)} записей)")
|
||||||
showNotification(
|
showNotification(
|
||||||
message,
|
message,
|
||||||
type = "message"
|
type = "message"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# SETUP AUTH =============================
|
# SETUP AUTH =============================
|
||||||
# Init DB using credentials data
|
# Init DB using credentials data
|
||||||
credentials <- data.frame(
|
credentials <- data.frame(
|
||||||
user = c("admin", "user"),
|
user = c("admin", "user"),
|
||||||
password = c("admin", "user"),
|
password = c("admin", "user"),
|
||||||
# password will automatically be hashed
|
# password will automatically be hashed
|
||||||
admin = c(TRUE, FALSE),
|
admin = c(TRUE, FALSE),
|
||||||
|
|||||||
Reference in New Issue
Block a user