Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ jwtKey: str = os.environ.get("JWTKey")
|
|
| 24 |
onlineUsers = {}
|
| 25 |
|
| 26 |
# Function Config
|
| 27 |
-
allow_signups: bool =
|
| 28 |
|
| 29 |
def jwtDecode(token):
|
| 30 |
try:
|
|
@@ -44,7 +44,7 @@ def index():
|
|
| 44 |
|
| 45 |
@app.route("/signup")
|
| 46 |
def signup():
|
| 47 |
-
if not allow_signups:
|
| 48 |
abort(404)
|
| 49 |
return render_template("signin.html")
|
| 50 |
|
|
@@ -87,7 +87,7 @@ def logout():
|
|
| 87 |
async def signupAPI():
|
| 88 |
supabase: AsyncClient = await acreate_client(url, key)
|
| 89 |
error = None
|
| 90 |
-
if not allow_signups: # Security mainly. Only allow signups when I want to.
|
| 91 |
abort(404)
|
| 92 |
if request.method == 'POST':
|
| 93 |
data = json.loads(request.data)
|
|
|
|
| 24 |
onlineUsers = {}
|
| 25 |
|
| 26 |
# Function Config
|
| 27 |
+
allow_signups: bool = True # Set to true when allowing a new user
|
| 28 |
|
| 29 |
def jwtDecode(token):
|
| 30 |
try:
|
|
|
|
| 44 |
|
| 45 |
@app.route("/signup")
|
| 46 |
def signup():
|
| 47 |
+
# if not allow_signups:
|
| 48 |
abort(404)
|
| 49 |
return render_template("signin.html")
|
| 50 |
|
|
|
|
| 87 |
async def signupAPI():
|
| 88 |
supabase: AsyncClient = await acreate_client(url, key)
|
| 89 |
error = None
|
| 90 |
+
# if not allow_signups: # Security mainly. Only allow signups when I want to.
|
| 91 |
abort(404)
|
| 92 |
if request.method == 'POST':
|
| 93 |
data = json.loads(request.data)
|