feat:新UI上线测试,问题可能比较多,稳定用户不建议用beta,请使用latest

This commit is contained in:
Lan
2024-11-23 17:06:40 +08:00
parent 41ae5b3d5a
commit f40b45c19f
117 changed files with 313 additions and 14 deletions
+3 -3
View File
@@ -19,10 +19,10 @@ class FileService:
await self.file_storage.delete_file(file_code)
await file_code.delete()
async def list_files(self, page: int, size: int):
async def list_files(self, page: int, size: int, keyword: str = ''):
offset = (page - 1) * size
files = await FileCodes.all().limit(size).offset(offset)
total = await FileCodes.all().count()
files = await FileCodes.filter(prefix__icontains=keyword).limit(size).offset(offset)
total = await FileCodes.filter(prefix__icontains=keyword).count()
return files, total
async def download_file(self, file_id: int):