chore/ 删除无用文件
This commit is contained in:
@@ -8,7 +8,12 @@ from app.features.memoir.models import Book, Chapter, ChapterSection, MemoirStat
|
||||
|
||||
|
||||
async def get_current_book(user_id: str, db: AsyncSession) -> Book | None:
|
||||
stmt = select(Book).where(Book.user_id == user_id).order_by(Book.updated_at.desc()).limit(1)
|
||||
stmt = (
|
||||
select(Book)
|
||||
.where(Book.user_id == user_id)
|
||||
.order_by(Book.updated_at.desc())
|
||||
.limit(1)
|
||||
)
|
||||
result = await db.execute(stmt)
|
||||
return result.scalar_one_or_none()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user