Remove register URL | Closes #2

This commit is contained in:
PV Tejas 2026-03-01 19:30:52 +05:30
parent ed71714a79
commit 67953ac42e
6 changed files with 10 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import functools
from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for
Blueprint, flash, g, redirect, render_template, request, session, url_for, current_app
)
from werkzeug.security import check_password_hash, generate_password_hash
@ -11,7 +11,8 @@ bp = Blueprint('auth', __name__, url_prefix='/auth')
@bp.route('/register', methods=('GET', 'POST'))
def register():
# return "Admin only", 403
if not current_app.config["ALLOW_REGISTER"]:
return "Admin only", 403
if request.method == 'POST':
username = request.form['username']
password = request.form['password']