Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,16 +6,6 @@ load_dotenv()
|
|
| 6 |
|
| 7 |
app = Flask(__name__)
|
| 8 |
|
| 9 |
-
@app.route('/login', methods=['POST'])
|
| 10 |
-
def login():
|
| 11 |
-
username = request.form.get('username')
|
| 12 |
-
password = request.form.get('password')
|
| 13 |
-
|
| 14 |
-
# Validate against environment variables
|
| 15 |
-
if username == os.getenv("ADMIN_USERNAME") and password == os.getenv("ADMIN_PASSWORD"):
|
| 16 |
-
return "Login successful!"
|
| 17 |
-
return "Invalid username or password!"
|
| 18 |
-
|
| 19 |
# Hardcoded user database (replace with real database in production)
|
| 20 |
users = {
|
| 21 |
"admin": "1234",
|
|
|
|
| 6 |
|
| 7 |
app = Flask(__name__)
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Hardcoded user database (replace with real database in production)
|
| 10 |
users = {
|
| 11 |
"admin": "1234",
|