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

Function upsertChannel

packages/core/src/channel.ts:308–321  ·  view source on GitHub ↗
(data: z.infer<typeof zChannelUpsert>)

Source from the content-addressed store, hash-verified

306}
307
308export function upsertChannel(data: z.infer<typeof zChannelUpsert>) {
309 return upsert({
310 create: () => createChannel(data.create),
311 update: (old) =>
312 updateChannel({
313 update: {
314 id: data.create.id,
315 ...data.update,
316 },
317 old,
318 }),
319 find: () => findChannelById(data.create.id),
320 });
321}
322
323export function upsertManyChannels(data: z.infer<typeof zChannelUpsertMany>) {
324 return upsertMany({

Callers 5

channel.test.tsFile · 0.90
seedOneFunction · 0.90
seedTwoFunction · 0.90
mutateChannelFunction · 0.90
storeIndexDataFunction · 0.90

Calls 4

upsertFunction · 0.90
createChannelFunction · 0.85
updateChannelFunction · 0.85
findChannelByIdFunction · 0.85

Tested by

no test coverage detected