diff --git a/.gitignore b/.gitignore index 07346f7..d2ca5e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .env .venv -app.db \ No newline at end of file +app.db +__pycache__ +flask_session \ No newline at end of file diff --git a/src/__pycache__/database.cpython-313.pyc b/src/__pycache__/database.cpython-313.pyc deleted file mode 100644 index a96c34f..0000000 Binary files a/src/__pycache__/database.cpython-313.pyc and /dev/null differ diff --git a/src/main.py b/src/main.py index 97c4c1a..d48da20 100644 --- a/src/main.py +++ b/src/main.py @@ -276,7 +276,7 @@ def post_create(): ref = ref[0] logger.info("Creating post in board ID: %s", board_id) - status = db.create_post(board_id, user_id, content, ref) + status = db.create_post(user_id, board_id, content, ref) if type(status) is not int: logger.error("Post creation failed.") @@ -306,9 +306,9 @@ def register(): logger.error("Username length is invalid.") return render_template('register.html', error="Username must be less than 20 characters.") - if len(password) < 6 or len(password) > 20: + if len(password) < 6 or len(password) > 200: logger.error("Password length is invalid.") - return render_template('register.html', error="Password must be between 6 and 20 characters.") + return render_template('register.html', error="Password must be between 6 and 200 characters.") if db.get_user(username): logger.error("Username already exists: %s", username)