Spaces:
Running
Running
Commit
·
8f9e879
1
Parent(s):
fdd1252
LOL IM DUMB HOW I DID IT
Browse files- routes/helpers.py +3 -3
routes/helpers.py
CHANGED
@@ -60,10 +60,10 @@ def thisIsHook(d):
|
|
60 |
raise Exception(f"Too long file (recieved {d['total_bytes']/1048576}MB, max is 50MB)")
|
61 |
|
62 |
# Get variable from request
|
63 |
-
def getFromRequest(request, thing):
|
64 |
try:
|
65 |
-
if request.method == 'POST': thing = request.form[
|
66 |
-
else: thing = thing.args[
|
67 |
return thing
|
68 |
except: return None
|
69 |
|
|
|
60 |
raise Exception(f"Too long file (recieved {d['total_bytes']/1048576}MB, max is 50MB)")
|
61 |
|
62 |
# Get variable from request
|
63 |
+
def getFromRequest(request, thing: str):
|
64 |
try:
|
65 |
+
if request.method == 'POST': thing = request.form[thing]
|
66 |
+
else: thing = thing.args[thing]
|
67 |
return thing
|
68 |
except: return None
|
69 |
|