add parameters in OperationLog
This commit is contained in:
@@ -41,6 +41,7 @@ class LoggingMiddleware(BaseHTTPMiddleware):
|
||||
userid = request.state.user.id,
|
||||
operation = request.method,
|
||||
function = request.url.path,
|
||||
parameters = str({"path": request.path_params,"query": dict(request.query_params),"body": request.state.body}),
|
||||
response = f"status_code:{response.status_code }" )
|
||||
|
||||
db = request.state.db
|
||||
|
||||
@@ -234,6 +234,7 @@ class OperationLog(Base):
|
||||
userid = mapped_column(Integer,ForeignKey("user.id"))
|
||||
operation = mapped_column(String(200))
|
||||
function = mapped_column(String(200))
|
||||
parameters = mapped_column(String(200))
|
||||
response = mapped_column(String(200))
|
||||
user = relationship('User')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user