(stripeCustomerId: string)
| 147 | export type ServerWithChannels = ReturnType<typeof findServerByIdWithChannels>; |
| 148 | |
| 149 | export async function findServerByStripeCustomerId(stripeCustomerId: string) { |
| 150 | const found = await db.query.dbServers.findFirst({ |
| 151 | where: eq(dbServers.stripeCustomerId, stripeCustomerId), |
| 152 | }); |
| 153 | if (!found) return null; |
| 154 | return addFlagsToServer(found); |
| 155 | } |
| 156 | |
| 157 | export async function findServerByStripeSubscriptionId( |
| 158 | stripeSubscriptionId: string, |
no test coverage detected