Remediate the 2026-09-03 feature-test findings
This commit is contained in:
@@ -5,7 +5,8 @@ from flask_jwt_extended import jwt_required
|
||||
|
||||
from shopdb.core.models import AuditLog
|
||||
from shopdb.extensions import db
|
||||
from shopdb.utils.responses import success_response, error_response, ErrorCodes
|
||||
from shopdb.utils.responses import (success_response, error_response,
|
||||
paginated_response, ErrorCodes)
|
||||
from shopdb.utils.authz import require_permission
|
||||
|
||||
auditlogs_bp = Blueprint('auditlogs', __name__)
|
||||
@@ -123,15 +124,12 @@ def list_auditlogs():
|
||||
for r in rows:
|
||||
r['userfullname'] = fullnames.get(str(r.get('username')))
|
||||
|
||||
return success_response(
|
||||
rows,
|
||||
meta={
|
||||
'page': page,
|
||||
'perpage': perpage,
|
||||
'total': pagination.total,
|
||||
'pages': pagination.pages
|
||||
}
|
||||
)
|
||||
# paginated_response, like every other list in the product. This one built
|
||||
# its own meta with the fields FLAT and named 'pages', so a client written
|
||||
# against the documented meta.pagination.{page,perpage,total,totalpages}
|
||||
# found nothing where it looked - on the one list whose whole purpose is to
|
||||
# be read by somebody checking what happened.
|
||||
return paginated_response(rows, page, perpage, pagination.total)
|
||||
|
||||
|
||||
@auditlogs_bp.route('/entity/<entitytype>/<int:entityid>', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user