fix bug
This commit is contained in:
@ -46,12 +46,14 @@ class TransferHistory(Base):
|
||||
|
||||
@staticmethod
|
||||
def list_by_title(db: Session, title: str, page: int = 1, count: int = 30):
|
||||
return db.query(TransferHistory).filter(TransferHistory.title == title).offset((page - 1) * count).limit(
|
||||
return db.query(TransferHistory).filter(TransferHistory.title == title).order_by(
|
||||
TransferHistory.date.desc()).offset((page - 1) * count).limit(
|
||||
count).all()
|
||||
|
||||
@staticmethod
|
||||
def list_by_page(db: Session, page: int = 1, count: int = 30):
|
||||
return db.query(TransferHistory).offset((page - 1) * count).limit(count).all()
|
||||
return db.query(TransferHistory).order_by(TransferHistory.date.desc()).offset((page - 1) * count).limit(
|
||||
count).all()
|
||||
|
||||
@staticmethod
|
||||
def get_by_hash(db: Session, download_hash: str):
|
||||
|
Reference in New Issue
Block a user