main: Use the new CSV struct and ACL trait

This commit is contained in:
George Kaklamanos 2023-11-20 21:08:08 +02:00
parent 3923654c94
commit 96ef1d6a4c
Signed by: gkaklas
GPG key ID: C0CAB8A6BDC9399D
2 changed files with 6 additions and 6 deletions

View file

@ -9,6 +9,7 @@ labadoor-telegram = { path = "../labadoor-telegram", optional = true }
labadoor-matrix = { path = "../labadoor-matrix", optional = true }
labadoor-csv = { path = "../labadoor-csv", optional = true }
labadoor-gpio = { path = "../labadoor-gpio", optional = true }
labadoor-acl = { path = "../labadoor-acl" }
serde = { version = "1.0.164", features = ["derive"] }
config = "0.13.3"

View file

@ -1,3 +1,4 @@
use labadoor_acl::ACL;
mod cli;
fn main() {
@ -25,12 +26,10 @@ fn main() {
#[cfg(feature = "csv")]
cli::Command::CSV(_) => {
let csv = config.get::<cli::CSV>("csv").unwrap();
labadoor_csv::csv(
csv.path.unwrap(),
csv.method.unwrap(),
csv.identifier.unwrap(),
csv.resource_shortcut.unwrap(),
);
let c = labadoor_csv::CSV {
path: csv.path.unwrap(),
};
c.auth_user(csv.method, csv.identifier, csv.resource_shortcut);
}
#[cfg(feature = "gpio")]
cli::Command::GPIO(_) => {