updated context
This commit is contained in:
parent
04b606b7fa
commit
40c35bda13
7 changed files with 67 additions and 25 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue