Merge pull request #128 from VAR-Virtual-Air-Rescue/staging

remove old User File from repo
This commit was merged in pull request #128.
This commit is contained in:
PxlLoewe
2025-07-27 20:34:45 -07:00
committed by GitHub
5 changed files with 9 additions and 6 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
letsencrypt letsencrypt
# Dependencies # Dependencies
node_modules node_modules
.pnp .pnp

View File

@@ -56,7 +56,7 @@ export const Chat = () => {
(d) => d.userId !== session.data?.user.id && !chats[d.userId], (d) => d.userId !== session.data?.user.id && !chats[d.userId],
); );
const filteredAircrafts = aircrafts?.filter( const filteredAircrafts = aircrafts?.filter(
(a) => a.userId !== session.data?.user.id && dispatcherConnected && !chats[a.userId], (a) => a.userId !== session.data?.user.id && !chats[a.userId],
); );
const btnActive = pilotConnected || dispatcherConnected; const btnActive = pilotConnected || dispatcherConnected;

View File

@@ -40,9 +40,11 @@ export const NewReportForm = ({
defaultValues: { defaultValues: {
reportedUserId: defaultValues?.reportedUserId || "", reportedUserId: defaultValues?.reportedUserId || "",
senderUserId: session.data?.user.id || "", senderUserId: session.data?.user.id || "",
reviewerComment: null,
reviewerUserId: null,
}, },
}); });
console.log(form.formState.errors);
return ( return (
<form <form
className="flex flex-wrap gap-3" className="flex flex-wrap gap-3"

View File

@@ -2,7 +2,7 @@
import { prisma } from "@repo/db"; import { prisma } from "@repo/db";
import { sendMailByTemplate } from "../../../helper/mail"; 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 bcrypt from "bcryptjs";
import { createNewUserFromOld, OldUser } from "../../../types/oldUser"; import { createNewUserFromOld, OldUser } from "../../../types/oldUser";
@@ -13,7 +13,7 @@ export const resetPassword = async (email: string) => {
email, 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 (!user) {
if (oldUser) { if (oldUser) {
user = await createNewUserFromOld(oldUser); user = await createNewUserFromOld(oldUser);

View File

@@ -1,7 +1,7 @@
"use server"; "use server";
import { prisma, Prisma } from "@repo/db"; import { prisma, Prisma } from "@repo/db";
import bcrypt from "bcryptjs"; 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"; import { OldUser } from "../../../types/oldUser";
export const register = async ({ password, ...user }: Omit<Prisma.UserCreateInput, "publicId">) => { 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, (u) => u.email.toLocaleLowerCase() === user.email,
); );