From 0d931a143ef71142d1020894b6aa0270e00bb5a9 Mon Sep 17 00:00:00 2001 From: Denis-Cosmin NUTIU Date: Mon, 30 Dec 2024 13:07:24 +0200 Subject: [PATCH] refactor code --- bot/src/bluesky.rs | 2 +- bot/src/cli.rs | 8 ++++++++ bot/src/main.rs | 1 + bot/src/{bluesky => }/token.rs | 0 4 files changed, 10 insertions(+), 1 deletion(-) rename bot/src/{bluesky => }/token.rs (100%) diff --git a/bot/src/bluesky.rs b/bot/src/bluesky.rs index 40d3ff5..8b13789 100644 --- a/bot/src/bluesky.rs +++ b/bot/src/bluesky.rs @@ -1 +1 @@ -mod token; + diff --git a/bot/src/cli.rs b/bot/src/cli.rs index 4d029b3..39ebe22 100644 --- a/bot/src/cli.rs +++ b/bot/src/cli.rs @@ -18,4 +18,12 @@ pub struct CliArgs { /// The current consumer name #[arg(short = 'n', long)] pub redis_consumer_name: String, + + /// The bluesky bot user's handle. + #[arg(short = 'h', long)] + pub bluesky_handle: String, + + /// The bluesky bot user's password. + #[arg(short = 'p', long)] + pub bluesky_password: String } diff --git a/bot/src/main.rs b/bot/src/main.rs index 177d982..dbfcfff 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -11,6 +11,7 @@ use std::thread; mod bluesky; mod cli; +mod token; //noinspection DuplicatedCode /// Sets up a signal handler in a separate thread to handle SIGINT and SIGTERM signals. diff --git a/bot/src/bluesky/token.rs b/bot/src/token.rs similarity index 100% rename from bot/src/bluesky/token.rs rename to bot/src/token.rs