From 96d7c6eadf5625e4fd92cd99c5b4b897570ff158 Mon Sep 17 00:00:00 2001
From: Ivan Kuchin <ivan.kuchin@gmail.com>
Date: Tue, 8 Jun 2021 18:26:48 -0400
Subject: [PATCH] infrastructure: dedicated folder for secret

---
 CMakeLists.txt        | 1 -
 src/pd/c_smartway.cpp | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd7085f..cc6dec8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,6 @@ set(GIT_INSTALL_DIR		${LOCAL_INSTALL_DIR}/git)
 set(PDF_FONT_INSTALL_DIR	${LOCAL_INSTALL_DIR}/libpdf-font)
 set(LIBXL_INSTALL_DIR		${LOCAL_INSTALL_DIR}/libxl)
 set(CONFIG_INSTALL_DIR		${LOCAL_INSTALL_DIR}/config)
-set(SECRET_INSTALL_DIR		${LOCAL_INSTALL_DIR}/secret)
 set(SSMTP_INSTALL_DIR		${LOCAL_INSTALL_DIR}/ssmtp)
 
 # ---- libxl library is not in apt-reporsitory, therefore is not installed on the OS
diff --git a/src/pd/c_smartway.cpp b/src/pd/c_smartway.cpp
index c1b821a..563c395 100644
--- a/src/pd/c_smartway.cpp
+++ b/src/pd/c_smartway.cpp
@@ -364,7 +364,7 @@ string C_Smartway::GetAuthJSON()
 	MESSAGE_DEBUG("", "", "start");
 
 	vector<string>	config_keys 		= {"SMARTWAY_LOGIN", "SMARTWAY_PASSWORD"};
-    auto	        auth_map        	= config->GetFromFullPathFile(SECRET_DIR, SECRET_FILE, config_keys);
+    auto	        auth_map        	= config->GetFromFile(SECRET_FILE, config_keys);
     auto	        is_auth_valid   	= (auth_map["SMARTWAY_LOGIN"].length() > 0);
     auto	        __SMARTWAY_LOGIN    = (is_auth_valid ? auth_map["SMARTWAY_LOGIN"] : "");
     auto	        __SMARTWAY_PASSWORD = (is_auth_valid ? auth_map["SMARTWAY_PASSWORD"] : "");