BinaryONe commited on
Commit
45c021b
·
1 Parent(s): f814edc

API update

Browse files
Files changed (1) hide show
  1. FileStream/DBFiles/database.py +1 -1
FileStream/DBFiles/database.py CHANGED
@@ -64,7 +64,7 @@ class PUBLICFilesDB:
64
  if next_offset >= total_results: # Changed > to >= to handle the last page correctly
65
  next_offset = ''
66
  cursor = self.files.find({}) # Apply the filter
67
- cursor.sort('$natural', pymongo.ASCENDING ) # Use pymongo.DESCENDING
68
  cursor.skip(offset).limit(10)
69
  files = await cursor.to_list(length=10)
70
  return files, next_offset
 
64
  if next_offset >= total_results: # Changed > to >= to handle the last page correctly
65
  next_offset = ''
66
  cursor = self.files.find({}) # Apply the filter
67
+ cursor.sort('$natural', pymongo.DESCENDING ) # Use pymongo.DESCENDING
68
  cursor.skip(offset).limit(10)
69
  files = await cursor.to_list(length=10)
70
  return files, next_offset