Migration
This commit is contained in:
@@ -78,7 +78,7 @@ export async function GET(request: NextRequest) {
|
||||
}
|
||||
|
||||
// Day-30: signed up > 30 days ago, has ≥1 QR code, still FREE, hasn't received this email yet
|
||||
const thirtyDayCandidates = await (db.user as any).findMany({
|
||||
const thirtyDayCandidates = await db.user.findMany({
|
||||
where: {
|
||||
createdAt: { lt: thirtyDaysAgo },
|
||||
thirtyDayNudgeSentAt: null,
|
||||
@@ -93,7 +93,7 @@ export async function GET(request: NextRequest) {
|
||||
if (user._count.qrCodes > 0 && user.email) {
|
||||
try {
|
||||
await sendThirtyDayNudgeEmail(user.email, user.name ?? 'there', user._count.qrCodes);
|
||||
await (db.user as any).update({
|
||||
await db.user.update({
|
||||
where: { id: user.id },
|
||||
data: { thirtyDayNudgeSentAt: now },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user