3 Commits 64787499dc ... 0e443c6df0

Author SHA1 Message Date
  tomoya 0e443c6df0 Merge branch 'front-dev' of http://git.choozmo.com:3000/ai-anchor/video-maker 3 weeks ago
  tomoya 3d0624c3e6 Merge branch 'master' of http://git.choozmo.com:3000/ai-anchor/video-maker 3 weeks ago
  tomoya 859aba2e3d modify crud_video.py 3 weeks ago
1 changed files with 5 additions and 0 deletions
  1. 5 0
      backend/app/app/crud/crud_video.py

+ 5 - 0
backend/app/app/crud/crud_video.py

@@ -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)