v1.5: Integrated optional category feature, i18n stabilization, and documentation update

This commit is contained in:
leeyj
2026-04-16 15:42:02 +09:00
parent df8ae62b0e
commit aef0179c56
47 changed files with 1699 additions and 544 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
from flask import Blueprint, request, jsonify, session, redirect, url_for # type: ignore
from flask import Blueprint, request, jsonify, session, redirect, url_for, current_app # type: ignore
from ..auth import check_auth
from ..utils.i18n import _t
@@ -13,7 +13,10 @@ def login():
if check_auth(username, password):
session.permanent = True # Enable permanent session to use LIFETIME config
session['logged_in'] = True
current_app.logger.info(f"AUTH: Success login for user '{username}' from {request.remote_addr}")
return jsonify({'message': 'Logged in successfully'})
current_app.logger.warning(f"AUTH: Failed login attempt for user '{username}' from {request.remote_addr}")
return jsonify({'error': _t('msg_auth_failed')}), 401
@auth_bp.route('/logout')