Skip to content

Commit

Permalink
fix(search): limit results for 5 items
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Jun 9, 2023
1 parent 083b3a8 commit 0dbc2a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trpc/router/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const search = router({
global: protectedProcedure.input(z.string()).query(async ({ ctx, input }) => {
const [goals, projects] = await Promise.all([
prisma.goal.findMany({
take: 5,
where: {
OR: [
{
Expand All @@ -29,6 +30,7 @@ export const search = router({
},
}),
prisma.project.findMany({
take: 5,
where: {
OR: [
{
Expand Down

0 comments on commit 0dbc2a9

Please sign in to comment.