forked from MarseyWorld/MarseyWorld
when granting monthly awards, add 5 days to the date
so when I grant awards on 29/5 for example, it says in the notification "for the month of July" instead of "for the month of May" extremely minor but I have autismmaster
parent
654ddc4157
commit
b4b4ab1e9a
|
@ -15,15 +15,13 @@ from flask import *
|
||||||
from files.__main__ import app, cache, limiter
|
from files.__main__ import app, cache, limiter
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from files.helpers.discord import add_role
|
from files.helpers.discord import add_role
|
||||||
from datetime import datetime
|
import datetime
|
||||||
import requests
|
import requests
|
||||||
from urllib.parse import quote, urlencode
|
from urllib.parse import quote, urlencode
|
||||||
|
|
||||||
GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip()
|
GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip()
|
||||||
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
||||||
|
|
||||||
month = datetime.now().strftime('%B')
|
|
||||||
|
|
||||||
@app.get('/admin/loggedin')
|
@app.get('/admin/loggedin')
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
def loggedin_list(v):
|
def loggedin_list(v):
|
||||||
|
@ -376,6 +374,9 @@ def club_ban(v, username):
|
||||||
def monthly(v):
|
def monthly(v):
|
||||||
if SITE_NAME == 'rDrama' and v.id != AEVANN_ID: abort (403)
|
if SITE_NAME == 'rDrama' and v.id != AEVANN_ID: abort (403)
|
||||||
|
|
||||||
|
month = datetime.datetime.now() + datetime.timedelta(days=5)
|
||||||
|
month = month.strftime('%B')
|
||||||
|
|
||||||
data = {'access_token': GUMROAD_TOKEN}
|
data = {'access_token': GUMROAD_TOKEN}
|
||||||
|
|
||||||
emails = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]]
|
emails = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]]
|
||||||
|
|
Loading…
Reference in New Issue