|
@@ -39,6 +39,11 @@ class CRUDVideo(CRUDBase[Video, VideoCreate, VideoUpdate]):
|
|
|
filename = random_name(n)
|
|
|
if not db.query(self.model).filter(Video.stored_filename==filename).first():
|
|
|
return filename
|
|
|
+
|
|
|
+ def get_multi(
|
|
|
+ self, db: Session, *, skip: int = 0, limit: int = 100
|
|
|
+ ) -> List[Video]:
|
|
|
+ return db.query(self.model).order_by(desc(Video.id)).offset(skip).limit(limit).all()
|
|
|
|
|
|
|
|
|
video = CRUDVideo(Video)
|