feat(cloud): free trial notifications (#254)

This commit is contained in:
Henry
2025-11-25 23:29:04 +00:00
committed by GitHub
parent 00be5fb058
commit 50382e9186
3 changed files with 67 additions and 20 deletions

View File

@@ -28,6 +28,15 @@ export const getById = async (db: dbClient, userId: string) => {
});
};
export const getByStripeCustomerId = async (
db: dbClient,
stripeCustomerId: string,
) => {
return await db.query.users.findFirst({
where: eq(users.stripeCustomerId, stripeCustomerId),
});
};
export const getByEmail = (db: dbClient, email: string) => {
return db.query.users.findFirst({
columns: {