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

Function saveCreature

server/creatures.ts:22–33  ·  view source on GitHub ↗
(creature: InsertCreature)

Source from the content-addressed store, hash-verified

20}
21
22export async function saveCreature(creature: InsertCreature) {
23 try {
24 const [newCreature] = await db
25 .insert(creatures)
26 .values(creature)
27 .returning();
28 return newCreature;
29 } catch (error) {
30 console.error(error);
31 throw new Error("Failed to save creature");
32 }
33}
34
35export async function getTenLatestCreatures() {
36 try {

Callers 1

submitGithubFormFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected