change function name

This commit is contained in:
Pakin 2025-07-31 09:25:40 +07:00
parent fcfae4f30e
commit d839291b6b
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ pub struct VersionRecipe {
impl VersionRecipe {
// import - read all file with given format from directory and mixing them together as 1 recipe
pub fn create_versioning_by_country(country: &str) -> Self {
let mut path = String::from(get_recipe_dir().get("RECIPE_DIR").unwrap());
let mut path = String::from(get_config().get("RECIPE_DIR").unwrap());
path.push_str(country);
path.push('/');

View file

@ -22,7 +22,7 @@ fn extract_tb_config(content: String) -> HashMap<String, String> {
}
/// Get config from `.tbcfg` file in current directory
pub fn get_recipe_dir() -> HashMap<String, String> {
pub fn get_config() -> HashMap<String, String> {
// need `.tbcfg`
let cfg_result = std::fs::read_to_string("./.tbcfg");
match cfg_result {
@ -42,7 +42,7 @@ pub fn create_recipe_model_from_file(path: String) -> models::recipe::Recipe {
}
pub fn create_recipe_path(country_path: &str, version: usize) -> String {
let mut path = String::from(get_recipe_dir().get("RECIPE_DIR").unwrap());
let mut path = String::from(get_config().get("RECIPE_DIR").unwrap());
path.push_str(country_path);
path.push_str("/coffeethai02_");