Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
|
| 4 |
-
from flask import Flask, render_template, url_for, request, make_response, session
|
| 5 |
import requests
|
| 6 |
from supabase import create_client, Client
|
| 7 |
import jwt
|
|
@@ -12,6 +12,10 @@ key: str = os.environ.get("SUPABASE_SERVICE_KEY")
|
|
| 12 |
supabase: Client = create_client(url, key)
|
| 13 |
jwtKey: str = os.environ.get("JWTKey")
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
@app.route("/")
|
| 16 |
def index():
|
| 17 |
return render_template("index.html")
|
|
@@ -20,6 +24,10 @@ def index():
|
|
| 20 |
def signupPage():
|
| 21 |
return render_template("signin.html")
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
@app.post("/api/signup")
|
| 24 |
def signupAPI():
|
| 25 |
error = None
|
|
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
|
| 4 |
+
from flask import Flask, render_template, url_for, redirect, request, make_response, session
|
| 5 |
import requests
|
| 6 |
from supabase import create_client, Client
|
| 7 |
import jwt
|
|
|
|
| 12 |
supabase: Client = create_client(url, key)
|
| 13 |
jwtKey: str = os.environ.get("JWTKey")
|
| 14 |
|
| 15 |
+
# Function Config
|
| 16 |
+
allowSignups: bool = True # Set to true when allowing a new user
|
| 17 |
+
|
| 18 |
+
|
| 19 |
@app.route("/")
|
| 20 |
def index():
|
| 21 |
return render_template("index.html")
|
|
|
|
| 24 |
def signupPage():
|
| 25 |
return render_template("signin.html")
|
| 26 |
|
| 27 |
+
@app.route("/login")
|
| 28 |
+
def loginPage():
|
| 29 |
+
return "<h1>WIP</h1>"
|
| 30 |
+
|
| 31 |
@app.post("/api/signup")
|
| 32 |
def signupAPI():
|
| 33 |
error = None
|