removed ui, docs package

This commit is contained in:
PxlLoewe
2025-05-24 13:07:55 -07:00
parent cbeae274a4
commit 5187ed194c
44 changed files with 214 additions and 933 deletions

View File

@@ -1,11 +1,10 @@
"use server";
import { prisma, Prisma, PrismaClient } from "@repo/db";
import { prisma, Prisma } from "@repo/db";
import { getServerSession } from "../../api/auth/[...nextauth]/auth";
import bcrypt from "bcryptjs";
export const unlinkDiscord = async (userId: string) => {
const client = new PrismaClient();
await client.discordAccount.deleteMany({
await prisma.discordAccount.deleteMany({
where: {
userId,
},
@@ -16,9 +15,7 @@ export const updateUser = async (changes: Prisma.UserUpdateInput) => {
const session = await getServerSession();
if (!session) return null;
const client = new PrismaClient();
await client.user.update({
await prisma.user.update({
where: {
id: session.user.id,
},
@@ -26,10 +23,7 @@ export const updateUser = async (changes: Prisma.UserUpdateInput) => {
});
};
export const changePassword = async (
oldPassword: string,
newPassword: string,
) => {
export const changePassword = async (oldPassword: string, newPassword: string) => {
const session = await getServerSession();
if (!session)
return {

View File

@@ -1,15 +1,9 @@
import { prisma } from "@repo/db";
import { getServerSession } from "../../api/auth/[...nextauth]/auth";
import { PrismaClient } from "@repo/db";
import {
ProfileForm,
SocialForm,
PasswordForm,
PilotForm,
} from "./_components/forms";
import { ProfileForm, SocialForm, PasswordForm, PilotForm } from "./_components/forms";
import { GearIcon } from "@radix-ui/react-icons";
export const page = async () => {
const prisma = new PrismaClient();
const session = await getServerSession();
if (!session) return null;
const user = await prisma.user.findFirst({