(data: z.infer<typeof zChannelUpsert>)
| 306 | } |
| 307 | |
| 308 | export 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 | |
| 323 | export function upsertManyChannels(data: z.infer<typeof zChannelUpsertMany>) { |
| 324 | return upsertMany({ |
no test coverage detected