From 0de0754e5bc115c54c97b1c0af36071bec5a17bc Mon Sep 17 00:00:00 2001 From: shad0wflame Date: Wed, 22 Dec 2021 16:20:46 +0100 Subject: [PATCH] The application now gets sensible info via environment variables. --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index da47538..8973c59 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,13 @@ mod go_daddy_ddns; mod ip_handler; -use go_daddy_ddns::*; +use std::env; #[tokio::main] async fn main() -> Result<(), Box> { - // TODO: [GoDaddy] - Get the domain from ENV variable to replace "a". - // TODO: [GoDaddy] - Get the key from ENV variable to replace "b". - // TODO: [GoDaddy] - Get the secret from ENV variable to replace "c". + let domain = env::var("DOMAIN").unwrap(); + let key = env::var("KEY").unwrap(); + let secret = env::var("SECRET").unwrap(); - go_daddy_ddns::exec("a", "b", "c").await + go_daddy_ddns::exec(&domain, &key, &secret).await }