Pride 26 campaign backend integration (#6254)

* wip: pride 2026 webhooks and stuff

* setup webhook and link to user

* fix up code

* improve donation resolution

* Pride 26 campaign

* idempotency

* wip: tiltify

* fix

* redis caching

* add num donators

* fix

* Revert openapi

* Prepare

* improve oauth token gen code
This commit is contained in:
aecsocket
2026-05-30 19:21:33 +00:00
committed by GitHub
parent 8c95f0bb81
commit c29973ec1a
17 changed files with 621 additions and 23 deletions
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM campaign_donations WHERE id=$1)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
null
]
},
"hash": "2248f0698a4195e8f1309d89d9ea78aeb06db699c469cdef0719486d9b938647"
}
@@ -0,0 +1,27 @@
{
"db_name": "PostgreSQL",
"query": "\n insert into campaign_donations (id, tiltify_event_id, raw_data, donated_at, amount_usd, user_id)\n values ($1, $2::text::uuid, $3, $4, $5, $6)\n on conflict (tiltify_event_id) do nothing\n returning id\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8",
"Text",
"Jsonb",
"Timestamptz",
"Numeric",
"Int8"
]
},
"nullable": [
false
]
},
"hash": "2f883a2641f3276be6e57f7fcce0f1c7cc2ba03e09094750dc501df45d8421d5"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT id, email,\n avatar_url, raw_avatar_url, username, bio,\n created, role, badges,\n github_id, discord_id, gitlab_id, google_id, steam_id, microsoft_id,\n email_verified, password, totp_secret, paypal_id, paypal_country, paypal_email,\n venmo_handle, stripe_customer_id, allow_friend_requests, is_subscribed_to_newsletter\n FROM users\n WHERE id = ANY($1) OR LOWER(username) = ANY($2)\n ",
"query": "\n SELECT id, email,\n avatar_url, raw_avatar_url, username, bio,\n created, role, badges,\n (\n SELECT MAX(campaign_donations.donated_at)\n FROM campaign_donations\n WHERE campaign_donations.user_id = users.id\n AND campaign_donations.amount_usd > 5\n ) AS campaign_pride_26,\n github_id, discord_id, gitlab_id, google_id, steam_id, microsoft_id,\n email_verified, password, totp_secret, paypal_id, paypal_country, paypal_email,\n venmo_handle, stripe_customer_id, allow_friend_requests, is_subscribed_to_newsletter\n FROM users\n WHERE id = ANY($1) OR LOWER(username) = ANY($2)\n ",
"describe": {
"columns": [
{
@@ -50,81 +50,86 @@
},
{
"ordinal": 9,
"name": "campaign_pride_26",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "github_id",
"type_info": "Int8"
},
{
"ordinal": 10,
"ordinal": 11,
"name": "discord_id",
"type_info": "Int8"
},
{
"ordinal": 11,
"ordinal": 12,
"name": "gitlab_id",
"type_info": "Int8"
},
{
"ordinal": 12,
"ordinal": 13,
"name": "google_id",
"type_info": "Varchar"
},
{
"ordinal": 13,
"ordinal": 14,
"name": "steam_id",
"type_info": "Int8"
},
{
"ordinal": 14,
"ordinal": 15,
"name": "microsoft_id",
"type_info": "Varchar"
},
{
"ordinal": 15,
"ordinal": 16,
"name": "email_verified",
"type_info": "Bool"
},
{
"ordinal": 16,
"ordinal": 17,
"name": "password",
"type_info": "Text"
},
{
"ordinal": 17,
"ordinal": 18,
"name": "totp_secret",
"type_info": "Varchar"
},
{
"ordinal": 18,
"ordinal": 19,
"name": "paypal_id",
"type_info": "Text"
},
{
"ordinal": 19,
"ordinal": 20,
"name": "paypal_country",
"type_info": "Text"
},
{
"ordinal": 20,
"ordinal": 21,
"name": "paypal_email",
"type_info": "Text"
},
{
"ordinal": 21,
"ordinal": 22,
"name": "venmo_handle",
"type_info": "Text"
},
{
"ordinal": 22,
"ordinal": 23,
"name": "stripe_customer_id",
"type_info": "Text"
},
{
"ordinal": 23,
"ordinal": 24,
"name": "allow_friend_requests",
"type_info": "Bool"
},
{
"ordinal": 24,
"ordinal": 25,
"name": "is_subscribed_to_newsletter",
"type_info": "Bool"
}
@@ -145,6 +150,7 @@
false,
false,
false,
null,
true,
true,
true,
@@ -163,5 +169,5 @@
false
]
},
"hash": "5fcdeeeb820ada62e10feb0beefa29b0535241bbb6d74143925e16cf8cd720c4"
"hash": "9139ada08ea017859b2928d2776f878ce9531daa7556fb0b4d2a467cafeaa130"
}