From e32d6ce118ac9680e6c2f674d7a62de9b439ca3b Mon Sep 17 00:00:00 2001 From: George Kaklamanos Date: Thu, 30 Nov 2023 17:18:00 +0200 Subject: [PATCH] Update configuration with auth.csv and log sections --- labadoor-auth/src/lib.rs | 2 +- labadoor/config.toml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/labadoor-auth/src/lib.rs b/labadoor-auth/src/lib.rs index 6a70e64..a044c76 100644 --- a/labadoor-auth/src/lib.rs +++ b/labadoor-auth/src/lib.rs @@ -22,7 +22,7 @@ pub fn auth(cli: &cli::Cli, config: ConfigBuilder) -> Result<(), ( for backend in backends { let acl = match backend { #[cfg(feature = "csv")] - cli::Backend::CSV => config.get::("csv").unwrap().to_config().new(), + cli::Backend::CSV => config.get::("auth.csv").unwrap().to_config().new(), }; match &cli.command { cli::Command::Open(cliargs) => { diff --git a/labadoor/config.toml b/labadoor/config.toml index 0b875cc..1228c3e 100644 --- a/labadoor/config.toml +++ b/labadoor/config.toml @@ -14,9 +14,18 @@ pin = 1 active_low = false active_time = 2000 +[log] +backends = ["csv"] + +[log.csv] +path = "./labadoor-csv" + [auth] backends = ["csv"] +[auth.csv] +path = "./labadoor-csv" + [open.auth] labadoor = [ "/usr/bin/labadoor", "auth" ]