From 05ebf87269fa7c0bb890ee6f3f5ba76d6d45480c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20T=E1=BA=A5n=20Kh=C3=B4i?= <43715386+HelpMe-Pls@users.noreply.github.com> Date: Tue, 30 Jan 2024 01:15:10 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E2=9C=8F=EF=B8=8F=20Fixed=20PR=20#45=20?= =?UTF-8?q?(#47)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02.solution.select/app/routes/users+/$username.tsx | 2 +- .../03.problem.nested-select/app/routes/users+/$username.tsx | 2 +- .../03.solution.nested-select/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../01.problem.delete/app/routes/users+/$username.tsx | 2 +- .../01.problem.delete/app/routes/users+/$username_+/notes.tsx | 2 +- .../01.solution.delete/app/routes/users+/$username.tsx | 2 +- .../01.solution.delete/app/routes/users+/$username_+/notes.tsx | 2 +- .../02.problem.update/app/routes/users+/$username.tsx | 2 +- .../02.problem.update/app/routes/users+/$username_+/notes.tsx | 2 +- .../02.solution.update/app/routes/users+/$username.tsx | 2 +- .../02.solution.update/app/routes/users+/$username_+/notes.tsx | 2 +- .../03.problem.transactions/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../03.solution.transactions/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../04.problem.nested/app/routes/users+/$username.tsx | 2 +- .../04.problem.nested/app/routes/users+/$username_+/notes.tsx | 2 +- .../04.solution.nested/app/routes/users+/$username.tsx | 2 +- .../04.solution.nested/app/routes/users+/$username_+/notes.tsx | 2 +- exercises/08.sql/01.problem.sql/app/routes/users+/$username.tsx | 2 +- .../01.problem.sql/app/routes/users+/$username_+/notes.tsx | 2 +- .../08.sql/01.solution.sql/app/routes/users+/$username.tsx | 2 +- .../01.solution.sql/app/routes/users+/$username_+/notes.tsx | 2 +- .../02.problem.validation/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../02.solution.validation/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../08.sql/03.problem.join/app/routes/users+/$username.tsx | 2 +- .../03.problem.join/app/routes/users+/$username_+/notes.tsx | 2 +- .../08.sql/03.solution.join/app/routes/users+/$username.tsx | 2 +- .../03.solution.join/app/routes/users+/$username_+/notes.tsx | 2 +- .../08.sql/04.problem.order/app/routes/users+/$username.tsx | 2 +- .../04.problem.order/app/routes/users+/$username_+/notes.tsx | 2 +- .../08.sql/04.solution.order/app/routes/users+/$username.tsx | 2 +- .../04.solution.order/app/routes/users+/$username_+/notes.tsx | 2 +- .../01.problem.foreign-keys/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../01.solution.foreign-keys/app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- .../app/routes/users+/$username.tsx | 2 +- .../app/routes/users+/$username_+/notes.tsx | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/exercises/06.querying/02.solution.select/app/routes/users+/$username.tsx b/exercises/06.querying/02.solution.select/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/06.querying/02.solution.select/app/routes/users+/$username.tsx +++ b/exercises/06.querying/02.solution.select/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/06.querying/03.problem.nested-select/app/routes/users+/$username.tsx b/exercises/06.querying/03.problem.nested-select/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/06.querying/03.problem.nested-select/app/routes/users+/$username.tsx +++ b/exercises/06.querying/03.problem.nested-select/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username.tsx b/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username.tsx +++ b/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username_+/notes.tsx b/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username_+/notes.tsx +++ b/exercises/06.querying/03.solution.nested-select/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/01.problem.delete/app/routes/users+/$username.tsx b/exercises/07.updating/01.problem.delete/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/01.problem.delete/app/routes/users+/$username.tsx +++ b/exercises/07.updating/01.problem.delete/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/01.problem.delete/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/01.problem.delete/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/01.problem.delete/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/01.problem.delete/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/01.solution.delete/app/routes/users+/$username.tsx b/exercises/07.updating/01.solution.delete/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/01.solution.delete/app/routes/users+/$username.tsx +++ b/exercises/07.updating/01.solution.delete/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/01.solution.delete/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/01.solution.delete/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/01.solution.delete/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/01.solution.delete/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/02.problem.update/app/routes/users+/$username.tsx b/exercises/07.updating/02.problem.update/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/02.problem.update/app/routes/users+/$username.tsx +++ b/exercises/07.updating/02.problem.update/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/02.problem.update/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/02.problem.update/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/02.problem.update/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/02.problem.update/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/02.solution.update/app/routes/users+/$username.tsx b/exercises/07.updating/02.solution.update/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/02.solution.update/app/routes/users+/$username.tsx +++ b/exercises/07.updating/02.solution.update/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/02.solution.update/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/02.solution.update/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/02.solution.update/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/02.solution.update/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/03.problem.transactions/app/routes/users+/$username.tsx b/exercises/07.updating/03.problem.transactions/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/03.problem.transactions/app/routes/users+/$username.tsx +++ b/exercises/07.updating/03.problem.transactions/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/03.problem.transactions/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/03.problem.transactions/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/03.problem.transactions/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/03.problem.transactions/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/03.solution.transactions/app/routes/users+/$username.tsx b/exercises/07.updating/03.solution.transactions/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/03.solution.transactions/app/routes/users+/$username.tsx +++ b/exercises/07.updating/03.solution.transactions/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/03.solution.transactions/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/03.solution.transactions/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/03.solution.transactions/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/03.solution.transactions/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/04.problem.nested/app/routes/users+/$username.tsx b/exercises/07.updating/04.problem.nested/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/04.problem.nested/app/routes/users+/$username.tsx +++ b/exercises/07.updating/04.problem.nested/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/04.problem.nested/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/04.problem.nested/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/04.problem.nested/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/04.problem.nested/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/04.solution.nested/app/routes/users+/$username.tsx b/exercises/07.updating/04.solution.nested/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/07.updating/04.solution.nested/app/routes/users+/$username.tsx +++ b/exercises/07.updating/04.solution.nested/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/07.updating/04.solution.nested/app/routes/users+/$username_+/notes.tsx b/exercises/07.updating/04.solution.nested/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/07.updating/04.solution.nested/app/routes/users+/$username_+/notes.tsx +++ b/exercises/07.updating/04.solution.nested/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/01.problem.sql/app/routes/users+/$username.tsx b/exercises/08.sql/01.problem.sql/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/01.problem.sql/app/routes/users+/$username.tsx +++ b/exercises/08.sql/01.problem.sql/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/01.problem.sql/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/01.problem.sql/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/01.problem.sql/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/01.problem.sql/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/01.solution.sql/app/routes/users+/$username.tsx b/exercises/08.sql/01.solution.sql/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/01.solution.sql/app/routes/users+/$username.tsx +++ b/exercises/08.sql/01.solution.sql/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/01.solution.sql/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/01.solution.sql/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/01.solution.sql/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/01.solution.sql/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/02.problem.validation/app/routes/users+/$username.tsx b/exercises/08.sql/02.problem.validation/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/02.problem.validation/app/routes/users+/$username.tsx +++ b/exercises/08.sql/02.problem.validation/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/02.problem.validation/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/02.problem.validation/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/02.problem.validation/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/02.problem.validation/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/02.solution.validation/app/routes/users+/$username.tsx b/exercises/08.sql/02.solution.validation/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/02.solution.validation/app/routes/users+/$username.tsx +++ b/exercises/08.sql/02.solution.validation/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/02.solution.validation/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/02.solution.validation/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/02.solution.validation/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/02.solution.validation/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/03.problem.join/app/routes/users+/$username.tsx b/exercises/08.sql/03.problem.join/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/03.problem.join/app/routes/users+/$username.tsx +++ b/exercises/08.sql/03.problem.join/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/03.problem.join/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/03.problem.join/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/03.problem.join/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/03.problem.join/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/03.solution.join/app/routes/users+/$username.tsx b/exercises/08.sql/03.solution.join/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/03.solution.join/app/routes/users+/$username.tsx +++ b/exercises/08.sql/03.solution.join/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/03.solution.join/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/03.solution.join/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/03.solution.join/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/03.solution.join/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/04.problem.order/app/routes/users+/$username.tsx b/exercises/08.sql/04.problem.order/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/04.problem.order/app/routes/users+/$username.tsx +++ b/exercises/08.sql/04.problem.order/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/04.problem.order/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/04.problem.order/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/04.problem.order/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/04.problem.order/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/04.solution.order/app/routes/users+/$username.tsx b/exercises/08.sql/04.solution.order/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/08.sql/04.solution.order/app/routes/users+/$username.tsx +++ b/exercises/08.sql/04.solution.order/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/08.sql/04.solution.order/app/routes/users+/$username_+/notes.tsx b/exercises/08.sql/04.solution.order/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/08.sql/04.solution.order/app/routes/users+/$username_+/notes.tsx +++ b/exercises/08.sql/04.solution.order/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username.tsx b/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username.tsx +++ b/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username_+/notes.tsx b/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username_+/notes.tsx +++ b/exercises/09.optimize/01.problem.foreign-keys/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username.tsx b/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username.tsx +++ b/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username_+/notes.tsx b/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username_+/notes.tsx +++ b/exercises/09.optimize/01.solution.foreign-keys/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username.tsx b/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username.tsx +++ b/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username_+/notes.tsx b/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username_+/notes.tsx +++ b/exercises/09.optimize/02.problem.multi-column-index/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username.tsx b/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username.tsx index 749b583c..d56bab9c 100644 --- a/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username.tsx +++ b/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username.tsx @@ -7,7 +7,7 @@ import { prisma } from '#app/utils/db.server.ts' import { getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const user = await prisma.user.findFirst({ + const user = await prisma.user.findUnique({ select: { name: true, username: true, diff --git a/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username_+/notes.tsx b/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username_+/notes.tsx index 62f030c6..655e3280 100644 --- a/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username_+/notes.tsx +++ b/exercises/09.optimize/02.solution.multi-column-index/app/routes/users+/$username_+/notes.tsx @@ -5,7 +5,7 @@ import { prisma } from '#app/utils/db.server.ts' import { cn, getUserImgSrc, invariantResponse } from '#app/utils/misc.tsx' export async function loader({ params }: DataFunctionArgs) { - const owner = await prisma.user.findFirst({ + const owner = await prisma.user.findUnique({ select: { name: true, username: true,