mirror of
https://github.com/penxio/penx.git
synced 2026-04-19 03:03:06 -04:00
33 lines
655 B
TypeScript
33 lines
655 B
TypeScript
import { Channel } from '@prisma/client'
|
|
import { z } from 'zod'
|
|
import { protectedProcedure, router } from '../trpc'
|
|
|
|
export const channelRouter = router({
|
|
listBySpaceId: protectedProcedure
|
|
.input(z.string())
|
|
.query(async ({ input }) => {
|
|
return [] as Channel[]
|
|
}),
|
|
|
|
create: protectedProcedure
|
|
.input(
|
|
z.object({
|
|
spaceId: z.string(),
|
|
name: z.string(),
|
|
}),
|
|
)
|
|
.mutation(async ({ ctx, input }) => {
|
|
return {} as Channel
|
|
}),
|
|
|
|
update: protectedProcedure
|
|
.input(
|
|
z.object({
|
|
id: z.string(),
|
|
}),
|
|
)
|
|
.mutation(async ({ ctx, input }) => {
|
|
//
|
|
}),
|
|
})
|