From 252c9054415d13d78b9a99aee715c24879c83d87 Mon Sep 17 00:00:00 2001 From: Marc Berli Date: Fri, 29 Mar 2024 12:19:29 +0100 Subject: [PATCH] Fix mismatching variable names in backend/seed documentation (#1928) --- web/docs/data-model/backends.md | 8 ++++---- web/versioned_docs/version-0.13.0/data-model/backends.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/docs/data-model/backends.md b/web/docs/data-model/backends.md index 8e9b52d25a..d76a5bd42b 100644 --- a/web/docs/data-model/backends.md +++ b/web/docs/data-model/backends.md @@ -171,7 +171,7 @@ export const devSeedSimple = async (prisma) => { } async function createUser(prisma, data) { - const newUser = await prismaClient.user.create({ + const newUser = await prisma.user.create({ data: { auth: { create: { @@ -180,7 +180,7 @@ async function createUser(prisma, data) { providerName: 'username', providerUserId: data.username, providerData: sanitizeAndSerializeProviderData({ - password: data.password + hashedPassword: data.password }), }, }, @@ -218,7 +218,7 @@ async function createUser( prisma: PrismaClient, data: { username: string, password: string } ): Promise { - const newUser = await prismaClient.user.create({ + const newUser = await prisma.user.create({ data: { auth: { create: { @@ -227,7 +227,7 @@ async function createUser( providerName: 'username', providerUserId: data.username, providerData: sanitizeAndSerializeProviderData<'username'>({ - password: data.password + hashedPassword: data.password }), }, }, diff --git a/web/versioned_docs/version-0.13.0/data-model/backends.md b/web/versioned_docs/version-0.13.0/data-model/backends.md index 8e9b52d25a..d76a5bd42b 100644 --- a/web/versioned_docs/version-0.13.0/data-model/backends.md +++ b/web/versioned_docs/version-0.13.0/data-model/backends.md @@ -171,7 +171,7 @@ export const devSeedSimple = async (prisma) => { } async function createUser(prisma, data) { - const newUser = await prismaClient.user.create({ + const newUser = await prisma.user.create({ data: { auth: { create: { @@ -180,7 +180,7 @@ async function createUser(prisma, data) { providerName: 'username', providerUserId: data.username, providerData: sanitizeAndSerializeProviderData({ - password: data.password + hashedPassword: data.password }), }, }, @@ -218,7 +218,7 @@ async function createUser( prisma: PrismaClient, data: { username: string, password: string } ): Promise { - const newUser = await prismaClient.user.create({ + const newUser = await prisma.user.create({ data: { auth: { create: { @@ -227,7 +227,7 @@ async function createUser( providerName: 'username', providerUserId: data.username, providerData: sanitizeAndSerializeProviderData<'username'>({ - password: data.password + hashedPassword: data.password }), }, },