feat: 增加fluent日志
This commit is contained in:
@@ -8,6 +8,7 @@ from service.record_service import get_record_by_id
|
||||
|
||||
def get_comment_by_id(db: Session, comment_id: int) -> Comments | None:
|
||||
result = db.execute(select(Comments).where(Comments.id == comment_id))
|
||||
|
||||
return result.scalar_one_or_none()
|
||||
|
||||
|
||||
@@ -33,6 +34,7 @@ def update_comment(db: Session, comment_id: int, comment_dto: CommentUpdate) ->
|
||||
comment.content = comment_dto.content
|
||||
db.commit()
|
||||
db.refresh(comment)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user