MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / upsertServer

Function upsertServer

packages/core/src/server.ts:198–210  ·  view source on GitHub ↗
(input: z.infer<typeof zServerUpsert>)

Source from the content-addressed store, hash-verified

196}
197
198export function upsertServer(input: z.infer<typeof zServerUpsert>) {
199 return upsert({
200 find: () => findServerById(input.create.id),
201 create: () => createServer(input.create),
202 update: (old) => {
203 if (!input.update) return old;
204 return updateServer({
205 update: { ...input.update, id: old.id },
206 existing: old,
207 });
208 },
209 });
210}
211
212import Dataloader from 'dataloader';
213

Callers 7

createChannelWithDepsFunction · 0.90
server.test.tsFile · 0.90
seedOneFunction · 0.90
seedTwoFunction · 0.90
mutateChannelFunction · 0.90
autoUpdateServerInfoFunction · 0.90
runMethod · 0.90

Calls 4

upsertFunction · 0.90
findServerByIdFunction · 0.85
createServerFunction · 0.85
updateServerFunction · 0.85

Tested by

no test coverage detected