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

Function getTenLatestCreatures

server/creatures.ts:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35export async function getTenLatestCreatures() {
36 try {
37 const creatures = await db.query.creatures.findMany({
38 orderBy: (creatures, { desc }) => desc(creatures.createdAt),
39 limit: 10,
40 });
41
42 return creatures;
43 } catch (error) {
44 console.error(error);
45 throw new Error("Failed to get creatures");
46 }
47}
48
49export async function getLeaderboard() {
50 try {

Callers 1

LatestCreaturesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected