( inviteCode: string, )
| 114 | } |
| 115 | |
| 116 | export async function findChannelByInviteCode( |
| 117 | inviteCode: string, |
| 118 | ): Promise<ChannelWithFlags | null> { |
| 119 | const data = await db.query.dbChannels.findFirst({ |
| 120 | where: eq(dbChannels.inviteCode, inviteCode), |
| 121 | }); |
| 122 | if (!data) return null; |
| 123 | return addFlagsToChannel(data); |
| 124 | } |
| 125 | |
| 126 | export async function findAllThreadsByParentId(input: { |
| 127 | parentId: string; |
no test coverage detected