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 /lib | |
| parent | ea8e1e045ad28f96030d54c7544160f5f654806b (diff) | |
| download | xesite-6b771b55030256378b1a2ca1e769f400ed52a7cb.tar.xz xesite-6b771b55030256378b1a2ca1e769f400ed52a7cb.zip | |
fix better????
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/patreon/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/patreon/src/lib.rs b/lib/patreon/src/lib.rs index 06c952c..a2fa63d 100644 --- a/lib/patreon/src/lib.rs +++ b/lib/patreon/src/lib.rs @@ -125,14 +125,16 @@ pub struct Links { impl Client { pub fn new() -> Result<Self> { + let mut creds = Credentials::default(); + let p = Path::new(".patreon.json"); let config = fs::read_to_string(p)?; - let creds: Credentials = serde_json::from_str(&config)?; + creds = serde_json::from_str(&config)?; Ok(Self { cli: reqwest::Client::new(), base_url: "https://api.patreon.com".into(), - creds, + creds: creds, }) } |
