feat: Add unique constraint on sound hash and update related tests
This commit is contained in:
@@ -116,7 +116,7 @@ class SoundRepository:
|
||||
async def get_popular_sounds(self, limit: int = 10) -> list[Sound]:
|
||||
"""Get the most played sounds."""
|
||||
try:
|
||||
statement = select(Sound).order_by(desc(Sound.play_count)).limit(limit)
|
||||
statement = select(Sound).order_by(Sound.play_count.desc()).limit(limit)
|
||||
result = await self.session.exec(statement)
|
||||
return list(result.all())
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user