forked from rDrama/rDrama
Merge branch 'master' of https://github.com/Aevann1/Drama
commit
2748b0b356
|
@ -118,6 +118,9 @@ else:
|
||||||
ZOZBOT_ACCOUNT = 5
|
ZOZBOT_ACCOUNT = 5
|
||||||
AUTOPOLLER_ACCOUNT = 6
|
AUTOPOLLER_ACCOUNT = 6
|
||||||
|
|
||||||
|
TAX_RECEIVER_ID = 747
|
||||||
|
TAX_RATE = 0.01
|
||||||
|
|
||||||
PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6'
|
PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6'
|
||||||
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ beams_client = PushNotifications(
|
||||||
secret_key=PUSHER_KEY,
|
secret_key=PUSHER_KEY,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/pay_rent")
|
@app.post("/pay_rent")
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("1/second")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
@ -117,9 +116,6 @@ def get_coins(v, username):
|
||||||
@is_not_banned
|
@is_not_banned
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def transfer_coins(v, username):
|
def transfer_coins(v, username):
|
||||||
TAX_RECEIVER_ID = 747
|
|
||||||
TAX_RATE = 0.01
|
|
||||||
|
|
||||||
receiver = g.db.query(User).filter_by(username=username).first()
|
receiver = g.db.query(User).filter_by(username=username).first()
|
||||||
tax_receiver = g.db.query(User).filter_by(id=TAX_RECEIVER_ID).first()
|
tax_receiver = g.db.query(User).filter_by(id=TAX_RECEIVER_ID).first()
|
||||||
|
|
||||||
|
@ -145,7 +141,7 @@ def transfer_coins(v, username):
|
||||||
send_notification(receiver.id, transfer_message)
|
send_notification(receiver.id, transfer_message)
|
||||||
|
|
||||||
log_message = f"[@{v.username}]({v.url}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.url})"
|
log_message = f"[@{v.username}]({v.url}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.url})"
|
||||||
send_notification(TAX_RECEIVER_ID.id, log_message)
|
send_notification(TAX_RECEIVER_ID, log_message)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
|
50
seed-db.sql
50
seed-db.sql
|
@ -1,28 +1,28 @@
|
||||||
INSERT INTO public.badge_defs VALUES (12, 'Gold Recruiter', 'Recruited 100 friends to join Drama', 'recruit-100', 1, 1);
|
INSERT INTO public.badge_defs VALUES (12, 'Gold Recruiter', 'Recruited 100 friends to join Drama', 'recruit-100.gif', 'v.referral_count>=100 and v.referral_count <=999');
|
||||||
INSERT INTO public.badge_defs VALUES (11, 'Silver Recruiter', 'Recruited 10 friends to join Drama', 'recruit-10', 1, 1);
|
INSERT INTO public.badge_defs VALUES (11, 'Silver Recruiter', 'Recruited 10 friends to join Drama', 'recruit-10.gif', 'v.referral_count>=10 and v.referral_count <= 99');
|
||||||
INSERT INTO public.badge_defs VALUES (10, 'Bronze Recruiter', 'Recruited 1 friend to join Drama', 'recruit-1', 1, 1);
|
INSERT INTO public.badge_defs VALUES (10, 'Bronze Recruiter', 'Recruited 1 friend to join Drama', 'recruit-1.gif', 'v.referral_count>=1 and v.referral_count<9');
|
||||||
INSERT INTO public.badge_defs VALUES (58, 'Diamond Recruiter', 'Recruited 1000 friends to join Drama', 'recruit-1000', 1, 1);
|
INSERT INTO public.badge_defs VALUES (58, 'Diamond Recruiter', 'Recruited 1000 friends to join Drama', 'recruit-1000.gif', 'v.referral_count >= 1000');
|
||||||
INSERT INTO public.badge_defs VALUES (25, 'Footpig', 'Contributed at least $100/month', 'patron-5', 3, 1);
|
INSERT INTO public.badge_defs VALUES (25, 'Footpig', 'Contributed at least $100/month', 'patron-5.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (61, 'Lab Rat', 'Helped test features in development', 'labrat', 3, 1);
|
INSERT INTO public.badge_defs VALUES (61, 'Lab Rat', 'Helped test features in development', 'labrat.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (63, 'Balls', 'I wrote carp on my balls as a sign of submission', 'carpballs', 3, 1);
|
INSERT INTO public.badge_defs VALUES (63, 'Balls', 'I wrote carp on my balls as a sign of submission', 'carpballs.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (4, 'White Hat', 'Responsibly reported a security issue', 'whitehat', 3, 1);
|
INSERT INTO public.badge_defs VALUES (4, 'White Hat', 'Responsibly reported a security issue', 'whitehat.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (2, 'Verified Email', 'Verified Email', 'mail', 1, 1);
|
INSERT INTO public.badge_defs VALUES (2, 'Verified Email', 'Verified Email', 'mail.gif', NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (6, 'Beta User', 'Joined during open beta', 'beta', 4, 1);
|
INSERT INTO public.badge_defs VALUES (6, 'Beta User', 'Joined during open beta', 'beta.gif', 4, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (15, 'Idea Maker', 'Had a good idea for Drama which was implemented by the developers', 'idea', 3, 1);
|
INSERT INTO public.badge_defs VALUES (15, 'Idea Maker', 'Had a good idea for Drama which was implemented by the developers', 'idea.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (3, 'Code Contributor', 'Contributed to Drama source code', 'git', 3, 1);
|
INSERT INTO public.badge_defs VALUES (3, 'Code Contributor', 'Contributed to Drama source code', 'git.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (1, 'Alpha User', 'Joined during open alpha', 'alpha', 4, 1);
|
INSERT INTO public.badge_defs VALUES (1, 'Alpha User', 'Joined during open alpha', 'alpha.gif', 4, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (18, 'Artisan', 'Contributed to Drama artwork', 'art', 3, 1);
|
INSERT INTO public.badge_defs VALUES (18, 'Artisan', 'Contributed to Drama artwork', 'art.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (27, 'Lolcow', 'Beautiful and valid milk provider', 'lolcow', 3, 1);
|
INSERT INTO public.badge_defs VALUES (27, 'Lolcow', 'Beautiful and valid milk provider', 'lolcow.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (21, 'Paypig', 'Contributed at least $5/month', 'patron-1', 3, 1);
|
INSERT INTO public.badge_defs VALUES (21, 'Paypig', 'Contributed at least $5/month', 'patron-1.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (22, 'Renthog', 'Contributed at least $10/month', 'patron-2', 3, 1);
|
INSERT INTO public.badge_defs VALUES (22, 'Renthog', 'Contributed at least $10/month', 'patron-2.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (23, 'Landchad', 'Contributed at least $20/month', 'patron-3', 3, 1);
|
INSERT INTO public.badge_defs VALUES (23, 'Landchad', 'Contributed at least $20/month', 'patron-3.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (24, 'Terminally online turboautist', 'Contributed at least $50/month', 'patron-4', 3, 1);
|
INSERT INTO public.badge_defs VALUES (24, 'Terminally online turboautist', 'Contributed at least $50/month', 'patron-4.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (28, 'Rich Bich', 'Contributed $500', 'patron-8', 3, 1);
|
INSERT INTO public.badge_defs VALUES (28, 'Rich Bich', 'Contributed $500', 'patron-8.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (7, 'Bug Finder', 'Found a bug', 'sitebreaker', 3, 1);
|
INSERT INTO public.badge_defs VALUES (7, 'Bug Finder', 'Found a bug', 'sitebreaker.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (60, 'Unironically Retarded', 'Demonstrated a wholesale inability to read the room', 'retarded', 3, 1);
|
INSERT INTO public.badge_defs VALUES (60, 'Unironically Retarded', 'Demonstrated a wholesale inability to read the room', 'retarded.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (26, 'Agendaposter', 'Forced to use the agendaposter theme', 'agendaposter', 1, 1);
|
INSERT INTO public.badge_defs VALUES (26, 'Agendaposter', 'Forced to use the agendaposter theme', 'agendaposter.gif', NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (17, 'Marsey Artisan', 'Contributed a Marsey emoji ✨', 'marseybadge-1', 3, 1);
|
INSERT INTO public.badge_defs VALUES (17, 'Marsey Artisan', 'Contributed a Marsey emoji ✨', 'marseybadge-1.gif', 3, NULL);
|
||||||
INSERT INTO public.badge_defs VALUES (16, 'Marsey Master', 'Contributed 10 (or more!!!!) Marsey emojis ✨', 'marseybadge-2', 3, 1);
|
INSERT INTO public.badge_defs VALUES (16, 'Marsey Master', 'Contributed 10 (or more!!!!) Marsey emojis ✨', 'marseybadge-2.gif', 3, NULL);
|
||||||
|
|
||||||
insert into public.award_relationships(id,user_id,kind) values(1,1,'shit');
|
insert into public.award_relationships(id,user_id,kind) values(1,1,'shit');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue