( id: string, )
| 104 | } |
| 105 | |
| 106 | export async function findChannelById( |
| 107 | id: string, |
| 108 | ): Promise<ChannelWithFlags | null> { |
| 109 | const data = await db.query.dbChannels.findFirst({ |
| 110 | where: eq(dbChannels.id, id), |
| 111 | }); |
| 112 | if (!data) return null; |
| 113 | return addFlagsToChannel(data); |
| 114 | } |
| 115 | |
| 116 | export async function findChannelByInviteCode( |
| 117 | inviteCode: string, |
no test coverage detected