(slug: string)
| 218 | * Get a channel by its website slug |
| 219 | */ |
| 220 | export async function getChannelByWebsiteSlug(slug: string): Promise<NotificationChannel | null> { |
| 221 | const result = await query<NotificationChannel>( |
| 222 | `SELECT * FROM notification_channels |
| 223 | WHERE website_slug = $1 AND website_enabled = true AND is_active = true`, |
| 224 | [slug] |
| 225 | ); |
| 226 | return result.rows[0] || null; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * Check if a channel is website-only (no Slack delivery) |
no outgoing calls
no test coverage detected