MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / getStarsLeaderboard

Function getStarsLeaderboard

server/creatures.ts:75–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75export async function getStarsLeaderboard() {
76 try {
77 const creatures = await db.query.creatures.findMany({
78 orderBy: (creatures, { desc }) => desc(creatures.stars),
79 limit: 10,
80 });
81 return creatures;
82 } catch (error) {
83 console.error(error);
84 throw new Error("Failed to get stars leaderboard");
85 }
86}
87
88export async function getCreatureTopPercentage(id: string) {
89 try {

Callers 1

StarsLeaderboardFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected