forked from MarseyWorld/MarseyWorld
verify
parent
3b0f14327a
commit
e0d95cf749
|
@ -21,18 +21,22 @@ GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip()
|
|||
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
||||
|
||||
month = datetime.now().strftime('%B')
|
||||
verified = int(time.time())
|
||||
|
||||
@app.get('/admin/merge/<id1>/<id2>')
|
||||
@admin_level_required(3)
|
||||
def merge(v, id1, id2):
|
||||
if int(time.time()) - verified > 10:
|
||||
verified = int(time.time())
|
||||
if v.id != AEVANN_ID: abort(403)
|
||||
|
||||
with open('verified', 'r') as f:
|
||||
verified = int(f.read())
|
||||
|
||||
if time.time() - verified > 10:
|
||||
session.pop("session_id", None)
|
||||
session.pop("lo_user", None)
|
||||
with open('verified', 'w') as f:
|
||||
f.write(str(int(time.time())))
|
||||
return redirect('/login')
|
||||
|
||||
if v.id != AEVANN_ID: abort(403)
|
||||
user1 = get_account(id1)
|
||||
user2 = get_account(id2)
|
||||
|
||||
|
@ -81,6 +85,17 @@ def merge(v, id1, id2):
|
|||
@admin_level_required(3)
|
||||
def merge_all(v, id):
|
||||
if v.id != AEVANN_ID: abort(403)
|
||||
|
||||
with open('verified', 'r') as f:
|
||||
verified = int(f.read())
|
||||
|
||||
if time.time() - verified > 10:
|
||||
session.pop("session_id", None)
|
||||
session.pop("lo_user", None)
|
||||
with open('verified', 'w') as f:
|
||||
f.write(str(int(time.time())))
|
||||
return redirect('/login')
|
||||
|
||||
user = get_account(id)
|
||||
|
||||
alt_ids = [x.id for x in user.alts_unique]
|
||||
|
|
Loading…
Reference in New Issue