refactor: небольшие изменения кода

This commit is contained in:
2026-04-14 11:43:10 +03:00
parent 5a021b7e8f
commit 6cf76641ed
2 changed files with 6 additions and 6 deletions

10
app.R
View File

@@ -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"

View File

@@ -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),