()
| 60 | } |
| 61 | |
| 62 | export async function getFollowersLeaderboard() { |
| 63 | try { |
| 64 | const creatures = await db.query.creatures.findMany({ |
| 65 | orderBy: (creatures, { desc }) => desc(creatures.followers), |
| 66 | limit: 10, |
| 67 | }); |
| 68 | return creatures; |
| 69 | } catch (error) { |
| 70 | console.error(error); |
| 71 | throw new Error("Failed to get followers leaderboard"); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | export async function getStarsLeaderboard() { |
| 76 | try { |
no outgoing calls
no test coverage detected