mit var.User.json in der gitignore kopiert git die auch nicht...

This commit is contained in:
PxlLoewe
2025-07-27 19:49:57 -07:00
parent 1b447edb11
commit a3e143145f
4 changed files with 784087 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
import { prisma } from "@repo/db";
import { sendMailByTemplate } from "../../../helper/mail";
import OLD_USER from "../../api/auth/[...nextauth]/var.User.json";
import v1User from "../../api/auth/[...nextauth]/var.User.json";
import bcrypt from "bcryptjs";
import { createNewUserFromOld, OldUser } from "../../../types/oldUser";
@@ -13,7 +13,7 @@ export const resetPassword = async (email: string) => {
email,
},
});
const oldUser = (OLD_USER as OldUser[]).find((u) => u.email.toLowerCase() === email);
const oldUser = (v1User as OldUser[]).find((u) => u.email.toLowerCase() === email);
if (!user) {
if (oldUser) {
user = await createNewUserFromOld(oldUser);

View File

@@ -1,7 +1,7 @@
"use server";
import { prisma, Prisma } from "@repo/db";
import bcrypt from "bcryptjs";
import OLD_USER from "../../api/auth/[...nextauth]/var.User.json";
import v1User from "../../api/auth/[...nextauth]/var.User.json";
import { OldUser } from "../../../types/oldUser";
export const register = async ({ password, ...user }: Omit<Prisma.UserCreateInput, "publicId">) => {
@@ -29,7 +29,7 @@ export const register = async ({ password, ...user }: Omit<Prisma.UserCreateInpu
},
});
const existingOldUser = (OLD_USER as OldUser[]).find(
const existingOldUser = (v1User as OldUser[]).find(
(u) => u.email.toLocaleLowerCase() === user.email,
);

File diff suppressed because it is too large Load Diff