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

Function getLeaderboard

server/creatures.ts:49–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49export async function getLeaderboard() {
50 try {
51 const creatures = await db.query.creatures.findMany({
52 orderBy: (creatures, { desc }) => desc(creatures.contributions),
53 limit: 10,
54 });
55 return creatures;
56 } catch (error) {
57 console.error(error);
58 throw new Error("Failed to get leaderboard");
59 }
60}
61
62export async function getFollowersLeaderboard() {
63 try {

Callers 1

ContributionLeaderboardFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected