Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patreon goals that scale with our income #18

Merged
merged 2 commits into from Oct 14, 2020
Merged

Conversation

qwertyquerty
Copy link
Contributor

Closes #17 as it is redundant

Makes it so Patreon goals switch with how much income we are already getting. If we are reaching a certain goal, switch to the next lowest one.

@@ -38,10 +38,13 @@ def page_api_stats_totals():
@bp_api.route("/budget")
def page_api_budget():
income = util.get_patreon_income()

current_goal = min([goal for goal in cfg.WEBSITE['patreon-goals'] if goal > income] or (max(cfg.WEBSITE['patreon-goals']),)) # Find the lowest goal we haven't passed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤮

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
🤮

@Crossedfall Crossedfall merged commit d2bfa11 into master Oct 14, 2020
@Crossedfall Crossedfall deleted the better-patreon-goals branch October 14, 2020 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants