updated context

This commit is contained in:
lnn0q 2025-03-23 21:27:14 +02:00
parent 04b606b7fa
commit 40c35bda13
7 changed files with 67 additions and 25 deletions

View file

@ -1,8 +1,13 @@
import { IdentityContext } from '@app/server/identity';
import { prisma, uuid } from '@app/server/prisma/client';
import { RegisterInput } from '@generated/types';
import bcrypt from 'bcrypt';
export async function SignUpResolver(_: any, input: RegisterInput): Promise<void> {
export async function SignUpResolver(
_: any,
input: RegisterInput,
{ identity }: IdentityContext
): Promise<void> {
const existingUsername = await prisma.user.findUnique({
where: { username: input.username },
select: { id: true }