( orgId: string )
| 10 | * Fetch whitelabel settings for an organization from the database. |
| 11 | */ |
| 12 | export async function getOrgWhitelabelSettings( |
| 13 | orgId: string |
| 14 | ): Promise<OrganizationWhitelabelSettings | null> { |
| 15 | try { |
| 16 | const [org] = await db |
| 17 | .select({ whitelabelSettings: organization.whitelabelSettings }) |
| 18 | .from(organization) |
| 19 | .where(eq(organization.id, orgId)) |
| 20 | .limit(1) |
| 21 | |
| 22 | return org?.whitelabelSettings ?? null |
| 23 | } catch (error) { |
| 24 | logger.error('Failed to fetch org whitelabel settings', { error, orgId }) |
| 25 | return null |
| 26 | } |
| 27 | } |
no test coverage detected