forked from cadey/xesite
blow up without patrone
Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
parent
3a4827c887
commit
ea8e1e045a
|
@ -125,18 +125,14 @@ pub struct Links {
|
|||
|
||||
impl Client {
|
||||
pub fn new() -> Result<Self> {
|
||||
let mut creds = Credentials::default();
|
||||
|
||||
let p = Path::new(".patreon.json");
|
||||
if p.exists() {
|
||||
let config = fs::read_to_string(p)?;
|
||||
creds = serde_json::from_str(&config)?;
|
||||
}
|
||||
let creds: Credentials = serde_json::from_str(&config)?;
|
||||
|
||||
Ok(Self {
|
||||
cli: reqwest::Client::new(),
|
||||
base_url: "https://api.patreon.com".into(),
|
||||
creds: creds,
|
||||
creds,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue