diff options
| author | Xe Iaso <me@christine.website> | 2022-04-05 21:02:14 -0400 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-04-05 21:02:14 -0400 |
| commit | 6b771b55030256378b1a2ca1e769f400ed52a7cb (patch) | |
| tree | 81ab6e080007cb2929627f2beb58e3ff9bfdfd77 /src | |
| parent | ea8e1e045ad28f96030d54c7544160f5f654806b (diff) | |
| download | xesite-6b771b55030256378b1a2ca1e769f400ed52a7cb.tar.xz xesite-6b771b55030256378b1a2ca1e769f400ed52a7cb.zip | |
fix better????
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/mod.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs index 221650b..a58551e 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1,7 +1,10 @@ use crate::{post::Post, signalboost::Person}; use color_eyre::eyre::Result; use serde::Deserialize; -use std::{fs, path::PathBuf}; +use std::{ + fs, + path::{Path, PathBuf}, +}; use tracing::{error, instrument}; pub mod markdown; @@ -18,6 +21,12 @@ pub struct Config { #[instrument] async fn patrons() -> Result<Option<patreon::Users>> { + let p = Path::new(".patreon.json"); + if !p.exists() { + info!("{:?} does not exist", p); + return Ok(None); + } + let mut cli = patreon::Client::new()?; if let Err(why) = cli.refresh_token().await { |
