don't read patreon creds from envvars
Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
parent
3a5c7adc42
commit
fa2ada9747
|
@ -124,8 +124,8 @@ pub struct Links {
|
|||
}
|
||||
|
||||
impl Client {
|
||||
pub fn new(creds: Credentials) -> Result<Self> {
|
||||
let mut creds = creds.clone();
|
||||
pub fn new() -> Result<Self> {
|
||||
let mut creds = Credentials::default();
|
||||
|
||||
let p = Path::new(".patreon.json");
|
||||
if p.exists() {
|
||||
|
|
|
@ -18,16 +18,7 @@ pub struct Config {
|
|||
|
||||
#[instrument]
|
||||
async fn patrons() -> Result<Option<patreon::Users>> {
|
||||
use patreon::*;
|
||||
let creds: Credentials = envy::prefixed("PATREON_")
|
||||
.from_env()
|
||||
.unwrap_or(Credentials::default());
|
||||
|
||||
if creds == Credentials::default() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let mut cli = Client::new(creds)?;
|
||||
let mut cli = patreon::Client::new()?;
|
||||
|
||||
cli.refresh_token().await?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue