Skip to content

Commit

Permalink
Add Poker Stream Donation Amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
no1mann committed Dec 10, 2023
1 parent e40c616 commit fe90044
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Cloudflare Pages Functions handles the API endpoints above by fetching data eith


## Development
The whole system is runs using 2 services, a Caching Service (using Cloudflare Workers) and the Web & API service (using Cloudflare Pages).
The whole system runs using 2 services, a Caching Service (using Cloudflare Workers) and the Web & API service (using Cloudflare Pages).

1. Install and Configure [Wrangler](https://developers.cloudflare.com/workers/wrangler/)
- If you're using Visual Studio Code, also install the extension [F5 Anything](https://marketplace.visualstudio.com/items?itemName=discretegames.f5anything) to help run launch configurations
Expand Down
12 changes: 6 additions & 6 deletions workers/tiltify-cache/kv/causes.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"description": "Tackling food insecurity by providing 920,000 meals across the UK in winter 2023/24.",
"url": "https://www.comicrelief.com/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=583",
"override": 1000
"override": 3500
},
{
"id": 589,
Expand All @@ -42,7 +42,7 @@
"description": "Unlocking a better future for LGBT+ youth with a national abuse and violence service.",
"url": "https://galop.org.uk/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=585",
"override": 0
"override": 2500
},
{
"id": 570,
Expand All @@ -51,7 +51,7 @@
"description": "Working towards a future where men and their communities live happier and longer lives, by solving some of the most complex issues facing men today such as prostate and testicular cancer.",
"url": "https://uk.movember.com/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=570",
"override": 0
"override": 5000
},
{
"id": 586,
Expand All @@ -60,7 +60,7 @@
"description": "Closing the digital divide for marginalised children and young people globally.",
"url": "https://www.projecthelloworld.org/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=586",
"override": 0
"override": 10000
},
{
"id": 587,
Expand All @@ -69,7 +69,7 @@
"description": "Regreening African landscapes by using indigenous techniques, (mobile) technology and communication to inspire farmers to restore their land.",
"url": "https://justdiggit.org/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=587",
"override": 0
"override": 7500
},
{
"id": 590,
Expand Down Expand Up @@ -105,6 +105,6 @@
"description": "Helping to end whaling and hunting for good so that whales and dolphins can keep performing their vital role in the ocean to help us fight climate and biodiversity breakdown.",
"url": "https://uk.whales.org/",
"donateUrl": "https://jinglejam.tiltify.com/campaigns?regionId=574",
"override": 0
"override": 2500
}
]
3 changes: 3 additions & 0 deletions workers/tiltify-cache/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ async function getSummaryData(env) {
if (charity.id === defaultCause.id) {
charity.raised.yogscast -= charityOverride;
charity.raised.yogscast += (defaultCause.override || 0);

charity.raised.yogscast = roundAmount(charity.raised.yogscast);

break;
}
}
Expand Down

0 comments on commit fe90044

Please sign in to comment.